Introducing Internet Macros

iOpus Internet Macros - Web Automation and Web Testing

What is Internet Macros ?

It is the first INTERNET-based macro recorder and a Web Scripting Powerhouse™. In a nutshell, it allows you to easily record web surfing and replay it.

Web surfing is fun, but many tasks are repetitious: Checking on the same sites everyday, remembering passwords, submitting to search engines or testing web sites over and over again. With Internet Macros you record these tasks once and then let Internet Macros execute them whenever you need them. Any combination of browsing, form filling, clicking and information gathering can be recorded into an Internet macro. Internet Macros assists you during the recording with visual feedback.

Do you need to test web sites? Have you ever thought that developing dynamic web applications was harder than it should be? Have you ever spent hours browsing over and over the same sequence of pages to test and correct an elusive bug?
If so, then our advanced PRO and Scripting Editions are for you. The PRO Edition spots an easy-to-use command line interface and data merging support. In addition, the Scripting Edition allows you to interface Internet Macros with the Windows Scripting Host (included in Windows), Visual Basic or any other Windows programming language.

How does Internet Macros Scripting Edition compare to the big name capture/replay testing tools on the market?
Well, if you want a huge, complex tool with hundreds of menus, a proprietary built-in scripting language that requires a week long training course to understand - well, then Internet Macros isn't for you. But if want a light-weight software tool that is flexible, easy-to-use and supports the well-documented Windows Scripting Host then we think Internet Macros is perfect for you.
iOpus Internet Macros SCRIPTING EDITION successfully competes with website testing software priced more than US$ 30,000 for only a fraction of the cost.

What can "Internet Macros" do for you?

The following list are only some examples of many possibilities. It can do (almost) everything that you can do with a web browser!

If you are a power surfer, it can do the following:
· Automatically complete forms
· Auto-login to your email (and, if you want, also write and send the email for you!)
· Navigate complex websites repeatedly without user intervention.
· Transparent, transportable macro files: Record on one PC, replay on any other PC that has Internet Macros installed. (In contrast, the Microsoft AutoComplete entries can NOT be copied from one PC to another.)
· SECURE storage of passwords using the industry standard "BLOWFISH" encryption algorithm
· Keep your privacy: Unlike some other form filling tools Internet Macros does NOT send any data back to us. All data is only stored on YOUR local PC..
· Share your macros with your colleagues and increase productivity for your whole organization.

If you are a Web Professional, it can do the following:
· Regression test whole areas of complex web sites at the click of a button
· Automate your search engine submissions, manage Google and Overture Pay per Click search engine listings and bidding automatically, extract information from websites, query online-databases and download the results automatically,...
· Internet Monitoring: Watch your web site and alert you if the macro encountered a problem on your web site. In contrast to plain Internet Monitoring services, Internet Macros can test online forms of any complexity (e. g. create test orders in an Online store) including even Java and Macromedia Flash based elements.
· Measure website response times with the STOPWATCH command to create performance statistics.
· Avoid complicated Perl scripts, Cron jobs, grep, sed, awk, lwp and other time-consuming Unix tools and commands. In addition, none of these tools has the wide functionality that Internet Macros has!
· Internet Macros can be set to simulate Internet Explorer (IE) completely. In this mode it is NOT possible at all for a web server to distinguish between a normal (human) user and the Internet Macros robot.
· Extract any TABLE directly into a comma-separated text file. These files can be read by almost any spreadsheet software, including Excel.

If you are a software developer, it can do the following:
· Extract data from web pages (web queries)
· Web enable your application in 5 minutes.
· You just have to write a macro and call the Internet Macros command line or Scripting interface. Internet Macros does the rest!
· Use Internet Macros as an Internet agent, robot or spider.
· Add "web surfing" and "web query" capability to your Windows Scripts
· Ship Internet Macros with your application. The Scripting Edition comes with a special redistribution license without royalty fees.

You don't have time to create Internet Macros yourself? You need more complicated internet functions automated? We create customized solutions for you based on our award-winning innovative software. Please ask or a free quote!

System Requirements
· Windows 98, ME, NT, 2000, or XP PC with 486 or higher processor (Pentium recommended) 8MB of free hard drive space for installation Microsoft Internet Explorer 5.5 or higher


Why Internet Macros

Good reasons to use iOpus Internet Macros

Save time

iOpus Internet Macros helps you to do your web chores quicker. Downloading, data entry and Web site testing - Internet Macros can do all that for you.

Save money

Why pay more for less? Internet Macros is THE low cost web testing solution. And it even outsmarts its US $30000 competition in many features.

Easy

You will create your first Internet Macro in less than a minute! No other web automation software is that easy to use.

Flexible

Automate even the most complicated tasks with the scripting interface. Connect Internet Macros to your favorite programming language. Windows Scripting Host and Visual Basic example programs are included.

Document Web page changes

Internet Macros can save Web pages or even print them out directly.

Be creative

Repetition is unavoidable, but you can get around it. Let iOpus Internet Macros take over the routine jobs, and save your precious time for the creative part.


Using IIM

iOpus Internet Macros is known for its intuitive user interface. The heart of the program tabbed interface on the left side of the IIM browser. A similar interface appears also in Internet Explorer after the IIM Plug-In is loaded.


Start IIM

Start Internet Macros

START iOpus Internet Macros:

IIM can be run in two versions

(1) Internet Explorer Plugin

After installing the software, a new icon called "IIM" appears in the menu bar of Internet Explorer (IE). Click this icon to start iOpus Internet Macros.

If you have already customized your toolbar, you might need to add the icon to the Internet Explorer toolbar manually:
1. To add the icon, select VIEW > TOOLBARS> CUSTOMIZE
2. Select the Internet Macros icon and add it.
3. Done! The icon appears in the toolbar

(2) The special Internet Explorer Browser [PRO and SCRIPTING Edition]

To start this program, click on the icon on your desktop, or navigate to the file "iimpro.exe" and click on it.

Tip: To get familiar with the Internet Macros, run the "Demo-FillForm" macro that is automatically installed. It demonstrates the basic features of IIM in an uncluttered way. It navigates to a test form, fills the form, sends it and goes back to the iOpus Internet Macro Website.


Recording

Select the "Record" tab strip of iOpus Internet Macros. Click record to start a recording. Now simply do what you want to record (surf to web sites, fill out forms, make a test order on your e-commerce site,...).

After you are done recording, press STOP. The current recording is automatically saved as "#current" macro. Press SAVE to save it under an individual name.

Hints for successful recording:

· A GREEN frame around a tag means that iOpus Internet Macros supports this tag.

· A RED frame around a tag means that you selected a web page element that is not useful for recording. These are mostly tags such as "BODY" that have no active functions.

· During recording, do NOT use your browsers BACK or FORWARD button or change the address line. Use the functions supplied by iOpus Internet Macros instead. [Internet Explorer Plugin only]

· Recording "Clicks":

If a macro generates an error during replay, you can experiment by selecting the link recording option manually:

1. Automatic: Internet Macros attempts to choose the best recording options (recommended in most cases)
2. Use URL - The link is detected by its URL. If the URL changes each time you visit a page, this option is not recommended unless you replace the changing part of the URL with an "*".
3. Use Name - The link is identified by its name. Works well in most cases unless there are several links with the same name on a page.
4. Use XY - The link is identified by its position on the Web page. This can be useful if the name and URL of the item you want to click on changes dynamically from visit to visit. It should also be used if the Web page element is embedded in Java Script, so that Internet Macros can not find the recorded name during replay, because it was created "on the fly" by Java Script.
5. Use Windows Clicks: This is the ultimate solution if everything else fails: It simulates standard mouse clicks on the browser window. This feature works with ALL Web pages, but IIM needs to be in front during replay. This option is only available in the IIM browser.

· With the Fill & Merge Manager, you can automatically insert the {{Merge}} tags during recording.

· Since the Internet Macros recording language is fully documented, it is easy to edit and "tweak" the macro manually after recording!

· Security: All passwords are stored with strong, industry standard "Blowfish" encryption. If you store sensitive data (e. g. your email log-in password) inside the Macro, we strongly recommend that you change the default encryption password ("iopus2001") to your own password. To change the password, go to the OPTIONS dialog and enter your new password. You can also disable the password encryption, if you do, run test with non-sensitive passwords. The password encryption can be either disabled for all macros in the Option dialog of IIM or individually for each macro with the "SET !ENCRYPTION NO" command.

· Press "STOP" to end recording and SAVE to save the macro you just recorded. By default, the file is automatically saved as "#current" after the recording is completed. Upon saving, the macro is parsed and Internet Macros attempts to remove all double or multiple entries.

· iOpus Internet Macros supports two recording options: FAST (the default) and ORIGINAL SPEED. If you record in the original speed mode iOpus Internet Macros automatically generates WAIT statements so that the replay is at the same speed as your recording. This is useful for recording demos. For most purposes however, you want to replay the tasks a fast as possible.

Tip: Be sure that you check our support page at http://www.iOpus.com/iim-support.htm for the latest recording tips & tricks or submit any recording problem at our online support form at http://www.iOpus.com/service/support.html .


Save Web Pages

Internet Macros automatically downloads and saves web pages for you.

Web page download

To save a web page insert the "SAVEAS" command into the macro,

Options:

(a) SAVEAS TYPE=FILE

You can download web pages with the iOpus Downloader. The iOpus Downloader saves the HTML of the web page. Images are not saved. Also, since the iOpus Downloader creates a second (new) connections to the web page, it can fail in certain situations. where the second connection results in a different web page.

Advantages:
· Simultaneous download and Internet Macros runs are possible
· Fast

Disadvantage:
· Can fail in on certain websites (e. g. www.google.com)

Note: This command can also used to save any type of file that is displayed in the browser. Normally this is a "HTML" type file (web page), but it can also be a picture (JPG, GIF, BMP,...).

(b) SAVEAS TYPE=FOLDER

This command invokes the internal Internet Explorer "SaveAs" command. So you will get exactly the same result as if you use the Internet Explorer "Save As" command. Web pages and images are saved. This command does not reload the web page.

Advantages:
· Works on every website
· Images elements are saved

Disadvantage:
· Only one macro can that uses this feature should run at a time

Tip: The download directory can be changed with the "SET !DDIR c:\myfolder\" command.


Download Files

Related example macros: Demo-FileDownload, Demo-ImageDownload

Internet Macros automatically detects and intercepts download. The iOpus Downloader takes over and completes the download. Since the iOpus Downloader creates a second connection to the web server, it can fail on certain "tricky" web pages that do not allow a direct connection. In this case the "iOpus Popup Manager" takes over and completes the download.

Normally the download file name is created automatically and consists of the download date, time and up to 30 characters of the web page title or file name (Example: "20020922_121511_iimfeatures.htm "). If you want to use a specific name for your download, you can set it with "SET !DFILE myfilename.htm" .This overrides the automatic file name generation.

Tip: You can configure if or if not the iOpus Downloader intercepts a download.

Example:

SET !DEXT EXE*ZIP*MP3

Now the downloader only downloads files with an "exe", "zip" or "mp3" extensions.

Tip 1: The download directory can be changed with the "SET !DDIR c:\myfolder\" command.

Tip 2: If you want to download images or similar elements, please read here.

Tech Tip (Advanced): You can edit the default settings for the Downloader by changing the list directly in the "iim.ini" file:

(1) Stop & close iOpus Internet Macros (IIM)

(2) Locate "iim.ini". This file is typically located in "C:\Documents and Settings\\Application Data\iOpus-I-M".

[Note: Since this is a system directory, it is "hidden" by default. Note: In most file managers (e.g. the Microsoft Windows Explorer) you need to enable the "display hidden / system files" option (or similar function) in order to see this directory. In the MS Explorer this option is located at View > Folder Options > View Tab > Go to the "Hidden Files" option and select "Show all"]

(3) Open "iim.ini" with a text editor (e. g. notepad. exe) and change the following line

DownloadFileTypes=EXE*ZIP*PDF*XLS*DOC*RTF*AVI*WAV*MP3

to

DownloadFileTypes=EXE*ZIP*MP3

(4) Save the changes

(5) Restart IIM for the new settings to take effect.


Image Download

Related example macro: Demo-ImageDownload

To download an image (or any other specific web page element) switch to recording mode, navigate to the page and press "Save item".
The item download window opens. Now select the image (or item) in the web browser window. The selection is displayed in the item download window for preview. If you like the selection, press ok. The item download manager automatically adds a TAG line to your macro:

TAG POS=1 TYPE=IMG ATTR=HREF:http://www.iopus.com/logo.jpg CONTENT=EVENT:DOWNLOAD

You can also create download tag lines manually: Simply add CONTENT=EVENT:DOWNLOAD to a normal TAG line.

The downloaded files are copied to the Internet Macros download directory. The items are taken directly from the web browser that displays them. They are NOT downloaded again to save time and bandwidth. The naming convention for downloaded images is the same as for downloaded files. This also means you can use "SET !DDIR" and "SET !DFILE" to specify your name for the downloaded image.

For a demo of this feature, please run the "Demo-ImageDownload" macro.


Replay

Replay Options:
Select a macro from the list and press PLAY. During replay the cursor frame is blue. To run IIM in the background, click on the "Tray" button [IIM Browser only].

To replay the recorded sequence several times fill in the number of loops and press START LOOP.

There are four different options for the replay speed:

· FAST - replay macro at maximum speed (Recommended in most cases)
· MEDIUM - wait 0.25s between each step
· SLOW - wait 1s between each step
· ORIGINAL - Replay macro at the recording speed. If you choose this option, IIM inserts WAIT statements during the macro recording process.

The replay speed is changed on the first tab of the options dialog. It can be also changed inside the macro with the !REPLAYSPEED variable.

Errors during replay:
We work hard to make Internet Macros as "intelligent" as possible, but it still is not as smart as you are: If an error occurs during replay it is mostly due to a "tricky" Web page at which one of the automatic suggestions of the Internet Macros Recorder failed. In almost all cases re-recording with different settings or manually editing the macro solves the issue. For recording tips please see "Recording" and for information on how to edit your macro go to the "Edit Macros" section.


Fill & Merge Manager

Click on the "Fill & Merge" button to open the "Fill & Merge" manager. It allows you to easily edit your data sources. It also can be used like a standard form filler to fill documents directly with the VALUE of a variable, or to insert the {{VARIABLE}} itself into the document to create a macro for later merging with the data source.


Advanced

Advanced features help you to fine-tune your Internet Macros.


Edit Macros

Related example macros: Demo-Tagposition

The recorded macro is stored in an easy to read text file and you can manually edit and "tweak" the macros.

For example, you could change the content of a form field.

Example: To change the Name of "Tom Tester" in the FormExampleMacro to "Dr. A. Award" locate the "TAG" command that contains the "Tom Tester" entry and change it as demonstrated below:

Old: TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:n1 CONTENT=Tom Tester
New: TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:n1 CONTENT=Dr.<SP>A.<SP>Award

<SP> indicates a " " (space).

Tip: The default editor for editing Internet Macros is "Windows Notepad" (notepad.exe). If you prefer to use another editor you can change the default editor in EDIT tab > click OPTIONS > PATHS tab.


Variables

Related example macros: Demo-Datasource, Demo-Slideshow

There are three kinds of variables in Internet Macros:

1. Built-in variables

These variables are used to define certain properties of the macro behavior, for example the macro timeout value:

SET !TIMEOUT 33

A complete list of all built-in variables is available.

2. !VAR1, !VAR2, !VAR3

These there variables can be defined with the set command

SET !VAR1 hello<SP>world

and later you can use these variable in any place inside the macro

3. User-defined Variables [PRO and SCRIPTING Edition]

These variables are created "on the fly" by the command line switch "-var_MYVAR <value>".

Example:

-var_ITEM 15

creates the variable {{ITEM}} and gives it the value 15.

These variables can be part of ANYTHING inside the macro. For example, you can add them as part of the "ATTR=" string in a TAG or EXTRACT command or as part of the GOTO statement.

Example: URL GOTO=https://www.myonlinestore.com/?shoppingcart={{cartnumber}}&item={{item}}


Winclick

The Winclick command

Related example macros: Demo-Winclick, Demo-FileUpload

The WINCLICK command is the ultimate solution if everything else fails: It simulates standard mouse clicks on the browser window. This feature works with ALL Web pages, but IIM needs to be in front during replay. This command is only available in the IIM browser.

Example:

WINCLICK X=200 Y=263 CONTENT=

The WINCLICK command can also send keystrokes to the web browser via the CONTENT= attribute:

Here is an example on how to send text:

'The pointer would interfere with sending text:
'=> Disable the position pointer temporarily
SET !POINTER NO
'First click on the input field to get the FOCUS
WINCLICK X=200 Y=263 CONTENT=
'Now send the keystrokes to the field
WINCLICK X=200 Y=263 CONTENT=My<SP>Text

You can also send special keys:

BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
DEL or DELETE {DELETE} or {DEL}
DOWN ARROW {DOWN}
END {END}
ENTER {ENTER} or ~
ESC {ESC}
HELP {HELP}
HOME {HOME}
INS or INSERT {INSERT} or {INS}
LEFT ARROW {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
PRINT SCREEN {PRTSC}
RIGHT ARROW {RIGHT}
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW {UP}
F1 {F1}
F2 {F2}
F3 {F3}
F4 {F4}
F5 {F5}
F6 {F6}
F7 {F7}
F8 {F8}
F9 {F9}
F10 {F10}
F11 {F11}
F12 {F12}
F13 {F13}
F14 {F14}
F15 {F15}
F16 {F16}

To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:

Key Code
SHIFT +
CTRL ^
ALT %

To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".

To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 19} means press the LEFT ARROW key 19 times; {h 10} means press H 10 times.


Data Merging

Related example macros: Demo-Datasource, Demo-ReadCSV, Script: Datasource-2-web.vbs, CSV-2-web.vbs, Database-2-web.vbs

If you want to submit different information to the same Web page (i. e. using the same Internet Macro) you can use the DATA MERGING functions. An example would be if you want to submit an online ad to different web sites.

The data source can in two different formats: Either a text file with a list of variables and their values of the form "variable_name=value" or as a comma separated text file (CSV format). A text file in CSV format can be generated by Microsoft Excel and many other applications.

As a rule of thumb the "list of variables" format is recommend if you have may different variables but only one or a few value for each variable (for example your detailed address data that you use to fill out online forms). The CSV format is most appropriate for use with a few variables with may different values (for example a long list of CD's that you want to submit to an auction web site).

Tip: Data merging and command line:
Specify the data source using the "-datasource" command line parameter:
iimpro -macro data-merge-example -datasource dinner.txt


Input from Comma Separated Data (CSV) File

Related example macros: Demo-ReadCSV, Script: CSV-2-web.vbs, Database-2-web.vbs

Internet Macros allows you to specify a text file with comma separated values as input, for example:

"ARTIST" , "ALBUM TITLE" , "PRICE"
"Beatles", "Abbey Road", "13.49"
"Beatles", "The Beatles 1,2,3" , "25.49"
"Mozart" , "Symphonies No.40 & 41", "9.98"
"Mozart", "Requiem", "7.50"

Note: Quotation marks "" are optional in most cases. They are only required if the value itself contains a comma.

Important: If you read data from a datasource in "CSV" format, the variable names must be of the format !COL1, !COL2, ...,!COL10 for the values of column 1, 2,...10 of the input file. You can not use user defined names like if you use the "List of Variables" format as input.

The Internet Macros file contains the location of the data files:

SET !DATASOURCE OnlineAuction.csv
SET !DATASOURCE_COLUMNS 3
SET !DATASOURCE_LINE {{!LOOP}}
TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Name CONTENT={{!COL1}}
TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Album CONTENT={{!COL2}}
TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Price CONTENT={{!COL3}}

With the "SET !DATASOURCE_COLUMNS 3" you specify the number of columns in the input file (3 in our example). This number must match the exact number of columns in the input file, even if you do not usee some columns.

With SET !DATASOURCE_LINE {{!LOOP}}you tell IIM which line of the file to read. In our example we use the !LOOP variable read the next line in the input file with each loop.

During the execution of the macro, the constants in parentheses {{..}} are replaced by the value specified in the data sources. The file name of the data source is stored in the variable !DATASOURCE. This variable can be filled from the command line if required.


Input from List of Variables File

Related example macros: Demo-Datasource Script: Datasource-2-web.vbs

Create plain text file(s) that contain the information you want to submit. In this example we create two text files. One contains the information on ordering a "lunch" and the other one is used for ordering "dinner".

Data source No. 1: (Data sources are located in the /datasource sub-directory of the Internet Macros directory)

lunch.txt could look like this:

[iOpus]
name=Mr.<SP>Tester
main=2 drink=2
smallsizedrink=NO
myremarks=Deliver<SP>to<SP>office

Data source No. 2:
dinner.txt could look like this:

[iOpus]
name=Tom<SP>Tester
main=1
drink=1
smallsizedrink=NO
myremarks=Deliver<SP>to<SP>home<SP>address:<BR>1629<SP>4th<SP>Avenue<BR>Thanks!<BR>Tom

The Internet Macros file contains the location of the data files:

CMDLINE !DATASOURCE lunch.txt
TAG TYPE=INPUT:TEXT FORM=NAME:TestForm2 ATTR=NAME:Name CONTENT={{name}}
TAG TYPE=SELECT FORM=NAME:TestForm2 ATTR=NAME:main CONTENT={{main}}
TAG TYPE=SELECT FORM=NAME:TestForm2 ATTR=NAME:drink CONTENT={{drink}}
TAG TYPE=INPUT:CHECKBOX FORM=NAME:TestForm2 ATTR=NAME:C8&&VALUE:ON CONTENT={{smallsizedrink}}
TAG TYPE=TEXTAREA FORM=NAME:TestForm2 ATTR=NAME:Remarks CONTENT={{myremarks}}

During the execution of the macro, the constants in parentheses {{..}} are replaced by the value specified in the data sources. The file name of the data source is stored in the variable !DATASOURCE. This variable can be filled from the command line as well:

Tips:

Tip 1: If you want Internet Macros to read different values for each loop, add a number at the end of the data value name and add !LOOP to the end of the name inside the macro:

Example: The datasource can look like:

[iOpus]
name1=Tom<SP>Tester
name2=Ann<SP>Smith
name3=Nicole<SP>Frank
main1=2
main2=1
main3=3

and in the macro you use:
TAG TYPE=INPUT:TEXT FORM=NAME:TestForm2 ATTR=NAME:Name CONTENT={{name!LOOP}}
TAG TYPE=SELECT FORM=NAME:TestForm2 ATTR=NAME:main CONTENT={{main!LOOP}}

You can specify the starting value of a loop with "SET !LOOP x" , x is the number of loops.

For another example on how to loop through a larger dataset, please see the "database-2-web.vbs" example windows script.

Tip 2: With the Fill & Merge Manager, you can automatically insert the {{Merge}} tags during recording.


HTML Popup Manager

Related example macro: Demo-NewWindow

Many websites open popup windows. In many cases these are just annoying advertisements that can be safely ignored but often these popups also contain important functions (e. g. a spell checker message, a more detailed explanation of an topic or the request for additional information).

Internet Macros can handle all cases: During macro recording all HTML popups are trapped and you are asked what to do with them:

(1) Ignore the popup: In this case you do not need to do anything, unless you tell Internet Macros otherwise, popups are automatically ignored during a macro replay. This feature is often called "popup killer" or "popup filter".

(2) Continue recording in popup: The popup contains information and buttons that you want to handle: If you click this button a "GOTOPOPUP" statement is inserted into the macro before the statement that triggered the popup. After you are done recording activity in the popup click "Done with popup" to go back to the main page. A LEAVEPOPUP statement is added to the macro code. [Only IIM-Browser, PRO/SCRIPTING Edition]

(3) Make popup the new main page: Typically this open is used if the new window is not a typical popup but rather a new "real" web page that opens in a new window. Internet Macros can trap this new browser window and send it to the main page. If you choose this option, a TRAPPOPUP statement is inserted in the macro code.


Window Popup Manager

Related example macro: Demo-OnPopup, Demo-DebugPopup

The Window Popup Manager allows you to manage all these pesky popups that appear with Internet Explorer from time to time (Since the IIM Browser emulates Internet Explorer, the same popups appear there as well).

Please note: This function refers to standard Windows popups (for example Java Script based popups or Internet Explorer error messages). It does NOT refer to the web browser popups. Web browser popups are handled with the "TRAPPOPUP" command.

The Popup Manager (PM) automatically handles the standard "Save As", "Download" and "Script Error" popups. For non-standard popups, for example: a web-site specific Java Script popup, it asks you which button PM should press for you. After you make your selection PM presses the Button for you and inserts a "ONPOPUP BUTTON =<yourchoice>" statement into the macro file.

Please note that the PM can only watch ONE running Internet Macros session. The PM is automatically assigned to the Internet Macro session that starts first. So if you have five Internet Macros Browsers open, PM will communicate with the one that was started first. So we recommend that whenever the Popup Manager is in use, only one macro that needs this functionality should run at a time. Other macros that make no use of the Popup Manager can run simultaneously.

Tip: If the website you are automating contains several popups in a short succession, please add a "ONPOPUP BUTTON=..." before every TAG or URL command that triggers a popup. At every "ONPOPUP..." command IIM checks if a PM is running and (if not) restarts the PM. This ensures that even on slower PCs the PM is "ready to click" before the (next) PM appears.

Note: Should you encounter any popup that Internet Macros can not handle, please notify us at support@iopus.com so that we can support it with the next update.

Note: More details about handling script errors can be found at http://www.iopus.com/iim/demo/script-error.htm


Response time measurements

Related example macro: Demo-Stopwatch

Web site response time measurement is important.

With the STOPWATCH statements Internet Macros allows you to measure the time that elapses between the first occurrence of this statement in a macro (= stopwatch on) and the second occurrence ( = stopwatch off). By using different id's in the stopwatch command you can create up to a 100 independent measurement points in your macro. You need to insert the STOPWATCH statements manually after you recorded your macro. For accurate measurements it is important to set the browser replay speed to "FAST", so no artificial delays are added.

Example:

VERSION BUILD=303725
SET !FILESTOPWATCH mydata.csv
STOPWATCH ID=total
URL GOTO=http://www.iopus.com/iim/iim.htm
STOPWATCH ID=1
TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/iim-features.htm
STOPWATCH ID=1
STOPWATCH ID=store
TAG POS=1 TYPE=A ATTR=TXT:US$<SP>149
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:order ATTR=NAME:ORDER_PRODUCT_NOW&&VALUE:Order<SP>Now
TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/store.htm
STOPWATCH ID=store
STOPWATCH ID=total

The file "mydata.csv" contains the measurement data. By default, the data is saved to the /download directory. The values are comma separated (CSV format) so it can be viewed with any text editor or imported directly in Excel or any other software you use to view your data.

Example file:

Format: Date, Time, Macro name, ID, time (s)

"2002/08/3","11:56:23","mymacro","1","1.272"
"2002/08/3","11:56:32","mymacro","store","8.943"
"2002/08/3","11:56:32","mymacro","total","10.21"

Tips for accurate measurements:

1. Add a CLEAR statement to your macro. This way you make sure that the browser cache is cleared before each run. Otherwise IIM might read the web pages from the cache and not the web server (If the cache is actually used, depends on the Internet Explorer settings.).
2. Run the measurements as a loop and average several runs. The "internet speed" can fluctuate from minute to minute even on a fast connection. Therefore differences between each measurement are normal. To get stable results, it is good practice to average several runs. For example, EXCEL can create averages automatically for you.
3. If you compare results between different PC's, please keep in mind that (as with all time critical software) the accuracy depends on the accuracy of the PC clock. Under normal conditions the processor speed should not influence the measured response times, unless the PC is so slow that the web page rendering of the browser and the IIM parsing is slowed down.


Extract single elements

Internet Macros can extract data from Web sites. Click on the EXTRACT button while in recording mode to bring up the extraction wizard.

Note: Internet Explorer 6.0 or better installed is required for the EXTRACT command.

To define an EXTRACT tag, proceed as follows:

(1) Open the Extraction Wizard (EXTRACT button on control panel). I

Note: If the information you want to extract is inside a framed web site, you need to click inside the frame that contains the information you want to extract before opening the Extraction Wizard. This generates the FRAME command and marks the frame as active for the extraction.

(2) In the browser window or frame, select the text that you want to extract.

(3) Click the "Suggest" Button. IIM creates a suggestion for the extraction anchor of the extraction tag. IIM later uses this anchor to return to the position where you want to extract text.

(4) Click TEST to test run the extraction tag.

(5) If you are satisfied with the result, click "Add" to add the EXTRACT statement to the macro.

If you extract a complete table, the table data is automatically converted into comma-separated data (see the "demo-extract-table" macro). This is a very powerful feature. It allows you to get the data of a complete table with only one command!

There are two methods to retrieve extracted data:

1. You can save extracted data directly to a file by adding "SAVEAS TYPE=EXTRACT" manually to the macro. All items that were extracted before the SAVEAS command are saved to a file in one row like "item1 , item2 , item 3, ...". With the next start of the macro or the next round of a LOOP, a new line is added to the file. The default file name is "extract.csv". The file name can be changed with "SET !FILEEXTRACT newname.txt".
2. If you do not use a "SAVEAS TYPE=EXTRACT" command in the macro, IIM returns the data to your code via the Scripting Interface.

Tip: Sometimes IIM can not suggest a proper EXTRACT tag automatically. In this case you can create one manually and test it with the TEST button in the Extraction Wizard.

Note: If one or more EXTRACT command are present in a macro, the return code is "2" if the macro completed successfully, even if one or more of the EXTRACT command failed because the extraction anchor was not found. Typically this happens because the web page changed.

The reason for this behavior that a macro can have many EXTRACT command and often (only) one of them does not find the extraction anchor. In this case the string "#EANF#" is returned. "EANF" stands for "Extraction anchor not found". So if you want to check if a particular EXTRACT command was successful, you just need to check if "#EANF#" is present in the returned string. Often, this can be very useful, for example if you use EXTRACT to check if a keyword is present on a page. A returned string with #EANF# in it, indicates then that the keyword is not found.

The text of a popup can be extracted with EXTRACTPOPUP. Add this command to your macro after the TAG command that triggers the popup.

Note 1: You can also extract values from INPUT boxes or SELECT (drop down lists) as well. For SELECT boxes, the currently active value is extracted. If you want to select ALL values of a drop down list, manually add #ALL# before the attribute.

Example:

Select currently active values:
EXTRACT POS=1 ELEM=0 ATTR=<SELECT<SP>size=1<SP>name=main>*

Select all values in a list:
EXTRACT POS=1 ELEM=0 ATTR=#ALL#<SELECT<SP>size=1<SP>name=main>*

Note 2: Some web pages make use of a "<PRE ...>" in their HTML code. It marks the text as "preformatted" -- all the spaces and carriage returns are rendered exactly as you type them. The information inclosed in a <PRE> tag is extracted correctly (including the formatting!) by Internet Macros. Thus if you transfer the extracted data to via the Scripting Interface all formatting information is retained unchanged. The formatting is only changed on two occasions: During the display in the test dialog box the line breaks are removed. The line breaks are also removed if you use the SAVE TYPE=EXTRACT method. This is necessary to ensure proper formatting of the CSV formatted text file, as in the CSV format, a line break would start a new line.

Example 1:

HTML page:

<HTML>
<B>Hello World</B>
<B>Text to be extracted</B>
<B>Good Morning</B>
<B>Good Afternoon</B>
<B>(c) iOpus</B>
<HTML>

To extract the text "Text to be extracted" you use

EXTRACT POS=2 ELEM=0 ATTR=<B>*

The POS=2 statement indicates that Internet Macros must search for the second occurrence of the extraction anchor on the web page. The ATTR tag contains the HTML extraction anchor, in this case a simple<B> tag plus the wild card symbol "*". IIM searches for this tag and extracts the content found there. (ELEM is always 0, this value is reserved for later use.)

Important: You MUST use "*" at the end of the extraction anchor to tell Internet Macros that it should ignore the rest of the element when searching for the anchor. Other possible extraction anchors in this case could be "<B>Te*" or "<B>Text<SP>to*". But they are not recommend because they will fail if "Text to be extracted" is changed to "Data to be extracted" on the web page.

Example 2:

HTML: <li><nobr><font face="Verdana" size="-1"><b>Salary:</b>33,000.00 per year</font></nobr></li>

EXTRACT POS=1 ELEM=0 ATTR=<FONT<SP>face=Verdana<SP>size=-1><B>Salary:</B>*

In this example we have a longer extraction anchor. As you can see, you basically cut the HTML in half to get the extraction tag and add "*" at the end. You can add "*" at multiple locations if required:

EXTRACT POS=1 ELEM=0 ATTR=<FONT<SP>face=*<SP>size=*><B>Salary:</B>*

Since the extraction anchor occurs only once on the Web page, POS has the default value of 1. The elements <li> and <nobr> are not used for comparison. The word "salary" is fixed and can be used as part of the extraction anchor. The extract text is "Salary: 33,000.00 per year".


Extract complete tables

Related example macro: Demo-Extract-Table

To extract a complete table as comma separated file and save it directly to your hard disk you can use:

EXTRACT POS=3 ELEM=0 ATTR=<TABLE*
SAVEAS TYPE=EXTRACT

This script extracts the third (POS=3) table on a web page to a file.

If the table looks like:
Order# | Item | Price (US$)
331-445 | Book | 29.95
444-555 | CD-ROM | 15.00
...the file has the following content:

Order# , Item , Price (US$)
331-445 , Book , 29.95
444-555 , CD-ROM, 15.00

Note 1: By default a comma (",") is used as separator. This can be modified by changing the entry for "CSVcomma=," in the Internet Macros settings file (File name: "iim.ini")


Extract & Scripting Interface

Related example scripts: Extract-and-fill.vbs, Extract-2-file.vbs, Get-Exchange-Rate.vbs

All extracted data can be send to your code via the Scripting Interface. This gives you all the power of Windows scripting to process the extract values further or simply save them to a file. Remember, the Scripting Interface can be used with ANY Windows programming language!

The iimGetLastMessage command to returns the extracted text if you used the EXTRACT command within the macro.

The extracted text is returned as a string. Different values are separated by [EXTRACT] (Example: "Text to be extracted[EXTRACT]Salary: 33,000.00 per year[EXTRACT]...")

Note 1: Do not use the SAVEAS TYPE=EXTRACT command if you want to return the extraction result to the Scripting Interface.

Note 2: If you extract a complete table, the data is separated by "#NEXT#" and each line ends with "#NEWLINE#". To convert this to the usual CSV format, please use the VBS "Replace" command (or its equivalent in another programming language):
s = Replace(s, "#NEWLINE#", """" + vbCrLf + """")
s = Replace(s, "#NEXT#", """"+ "," + """")

Example 1: (Split the returned EXTRACT string)

Dim data as String
Dim s as String
Dim ExchangeRate '<=this is the array that holds the different extract values after using split
iplay = iim1.iimPlay("wsh-extract")   [Return value: <0: Error, 1: Normal completion, 2: Text extracted]
If iplay = 2 Then
   data = iim1.iimGetLastMessage() 'copy the result of all EXTRACT statements to the data string
    ExchangeRate= Split(data, "[EXTRACT]")
    s = "One US$ costs " + ExchangeRate(0) + " EURO or " + ExchangeRate(1) + " British Pounds (GBP)"
    MsgBox s
End If

Example 2: (keyword search)

We want to find out if the word "iopus" exists on a web page. If yes, print the page.
To search the web page, create a mysearch macro:

VERSION BUILD=3301125
'The keyword *is* the data extraction anchor!
EXTRACT POS=1 ELEM=0 ATTR=*iopus*

To print the web page, create print_this macro:

VERSION BUILD=3301125
PRINT

Use the following Windows Script to control the macros:

set iim1= CreateObject ("iimwsh.iim")
iret = iim1.iimInit()
iplay = iim1.iimPlay("mysearch")
extracted_text = iim1.iimGetLastMessage()
'test if keyword appeared on website.
'The keyword *is* the data extraction anchor!
If iplay = 2 Then
   if instr (extracted_text, "#EANF#") > 0 then
          MsgBox ("Sorry, keyword not found")
   else
         iplay = iim1.iimPlay("print_this")
   End If
End if
If iplay < 0 Then
       MsgBox "Error!"
End If

More Examples:

Internet Macros comes with several example scripts that demonstrate the EXTRACT command:

· extract-2-file.vbs
· extract-and-fill.vbs
· get-exchange-rate.vbs

The scripts are found in the "Examples\Windows Scripting Host" directory. More example scripts and test pages are available at http://www.iOpus.com/iim/demo


IIM Commands Overview

Macro Commands

' <==
If a line starts with " ' " everything behind the " ' " is ignored. Typically this is used for comments or to disable specific parts of a macro.

BACK
Go BACK one step

CLEAR
Clear browser cache AND cookies. Useful for example to delete Web site cookies so every macro run starts at the some point.

CLICK X=123 Y=111 CONTENT=ABC
"Clicks" on the element at the specified X/Y coordinates. In contrast to WINCLICK, this click can be run in background mode. The optional CONTENT= attribute can be used to send text to the clicked element (e. g. if the clicked element is an input box)

CMDLINE <!VAR> <default value>
Set the variable to a value retrieved from the command line. Use the-var1, -var2 and -var3 switches to set the variables from the command line.

DISCONNECT
Disconnect the current dial-up connection. Tip: On Dial-Up connections DISCONNECT & REDIAL can be used to change IP addresses.

EXTRACT POS=1 ELEM=0 ATTR=(Anchor*)
Extract data from websites. Please note that the anchor normally ends with "*". (ELEM is always 0, this value is reserved for later use)

FRAME F=<value>
Directs all following TAG or EXTRACT commands to the specified frame. The frame tag and number is automatically generated by clicking into a framed web page. Example macro: "Demo-Frames.iim"

EXTRACTPOPUP
Extract data from a popup. The text of a website popup is extracted. The text is processed the same way as standard EXTRACT text.

GOTOPOPUP
Continue recording inside a popup. [IIM Browser only]

LEAVEPOPUP
Close popup and go back to main page. [IIM Browser only]

ONPOPUP BUTTON=OK
Instructs the Popup Manager to click the [OK] button for the next popup. This settings remains valid until changed with another "ONPOPUP" command.

PRINT
Print the current browser window.
Tip: If you want to print PDF files with the Acrobat Reader Plug-In, you need to add a "ONPOPUP BUTTON=OK" command before the PRINT statement.

PROMPT <Text> <!VAR> <default value>
Display a popup to ask for a value. This value is stored in the variable.

Note: This command can be used with variables !VAR1, !VAR2 or !VAR3, but not with built-in variables like !DATASOURCE or dynamically generated variables from the "-var_X" command.

REDIAL YourISP
Redial a connection. "YourISP" is the name of your dialup connection as it appears in the Windows dialup selection.

REFRESH
Refresh (Reload) current browser window

SAVEAS TYPE=FILE
Save the file that is currently displayed in the browser. Typically this is the current Web page (HTML file) but it can also be a graphics file. A date & time stamp is automatically added to create a unique file name

SAVEAS TYPE=FOLDER
Save the current Web page, including graphics. A date & time stamp is automatically added to create a unique file name. This command brings up a "Save As" dialog that is handled by the Popup Manager.

SAVEAS TYPE=EXTRACT
Save extracted data to a file. This command must be used after the extract command itself. If several EXTRACT commands are used within one macro, the content is appended to the file. If a new macro is started, any file content is overwritten. The file name is defined with "SET !FILEEXTRACT yourfile.csv".

SET <!VAR> <value>
SET <BuiltInVAR> <value>
This command sets the variable !VAR1, !VAR2 or !VAR3 or one of the built-in variables to a certain value. Note: This command can be used with variables !VAR1, !VAR2 or !VAR3 or one of the built-in variables, but not with the dynamically generated variables from the "-var_X" command.

Available built-in variables:

Variable Name & Purpose

!DATASOURCE Input file for merging data with macro. Example: SET !DATASOURCE c:\mysource.txt

!DDIR Download directory. Overrides the default download directory: Example: SET !DDIR c:\mynewdir\

!DEXT Download extensions. Change the file extensions that trigger the iOpus downloaded: Example: SET !DEXT exe*zip*mp3*csv*pdf
For permanent changes you can edit the default settings in the "iim.ini" settings file.

!DFILE Download file name. Normally this name is created automatically and consists of the download date, time and 30 characters of the web page title or file name. If you want to use a specific name for your download, you can set them with "SET !DFILE myfilename.htm".

!ERRORMACRO Overrides the global error macro setting in the option dialog for the current macro

!ERRORIGNORE (YES/NO) Tells IIM to ignore errors that can be safely ignored. For example TAG commands that are not found on the Web page.

!ENCRYPTION (YES/NO) Can be used to disable the use of password encryption for the current macro. Applies only to password fields on a Web page. (Password fields are the ones where words are displayed using asterisks ****).

!EXTRACT_TEST_POPUP (YES/NO). Set this value to NO to disable the extract testing popup that appears by default if you run a macro with an extract popup directly and not by using the command line or scripting interface.

!FILESTOPWATCH Set the file name for the file that contains the stopwatch measurement data. By default the file name is "stopwatch.csv" and is located in the download directory. You can use a name or a fully qualified path name. Example: SET !FILESTOPWATCH mynewfile.txt

!FILEEXTRACT Set the file name to save extracted data. By default the file name is "extract.csv" and is located in the download directory. You can use a name or a fully qualified path name. Example: SET !FILEEXTRACT mycurrency.txt .Alternatively you can use the Scripting Interface to access the extracted data.

!LOOP Counts the current loop in loop mode. Especially useful together with the POS=... attribute of the TAG command. See for example the "Demo-Slideshow" macro. With SET !LOOP 3 you can set a start value for the loop counter (the default value is 1). This is useful when you use the {{loop}} variable inside you macro and want to start with a value different from 1. SET !LOOP is ignored for every loop run except the first one.

!POINTER (YES/NO) Disable the pointer (blue frame) that marks the current position during a macro replay.

!POPUPMANAGER (YES/NO) Activate or stop the Windows Popup Manager (Do not confuse this with the HTML popup manager). Example: If you want your users to handle the print dialog manually, you can use SET !POPUPMANAGER NO before the PRINT command.

!REPLAYSPEED (1/2/3) Set the replay speed to fast(1), medium(2) or slow(3).

!TAGCHECK YES/NO: Switch the check for completed loaded web sites off. See for example Demo-FillVariousWebsites.

!TIMEOUT New timeout value in seconds. Overrides the Internet macro default value. Example: SET !TIMEOUT 150

!URLSTART The url that was active in the browser when the macro started. Typically used to go back to the start page inside the macro.

SIZE X=730 Y=655
Resize the IIM Browser Window (width, height in pixels). In Internet Explorer, this command is ignored. [PRO and SCRIPTING Editions only]

STOPWATCH ID=MyName
Web site response time measurement. By default, the measured data is stored in the download directory of Internet Macros. You can change the file location with the !FILESTOPWATCH variable. [PRO and SCRIPTING Editions only]

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:TestForm2 ATTR=NAME:Name CONTENT=Tom<SP>Tester

TAG POS=3 .....
TAG POS={{!LOOP}}
The TAG command:
Syntax: TAG TYPE=<Type of HTML element> FORM=<Form name> ATTR=<Identifier of element> CONTENT=<Content>
Example: This line fills an INPUT field with the name "name" with the text "Tom Tester"

Sometimes a web page can contain links with the same text, e. g. many links with the name "Download". This command tells IIM, to not use the first link it finds, but - for example - the 3rd link. When combined with the !LOOP variable it can be used to process on link after the other.

Special TAG commands for TYPE=SELECT:

By default, the CONTENT attribute of TYPE=SELECT stores the position (also called index) of value. But you can manually edit this to select ALL values of a multiple selection box. Also, to select the values by name add "$" before the name). Spaces must be written as <SP>. The comparison is case insensitive and wild cards like "*" can be used.

Example:
CONTENT=2:4 <= Normal selection (the position of a value is stored)
CONTENT=$Apple<SP>Pie:$Fruits <= Selection by name (add $ before the name)
CONTENT=$*apple*:$FRU*" <= Selection by name (wild cards, case insensitive comparison)
CONTENT=ALL <= select ALL values of a selection. Useful if the number of values changes dynamically

Special TAG commands for non-input fields (like the types A (link), B(bold) or IMG (image)):

Instead of a click on the element you can also ask IIM to fire other events, for example trigger a "mouseover" event to display a menu item. To do this, add a CONTENT attribute to the TAG line. Often these events are used to trigger Javascript menu items.
Example:
TAG POS=1 TYPE=IMG ATTR=HREF:http://www.iopus.com/images/menu1.gif CONTENT=EVENT:#MOUSEOVER

TYPE=FILE: Internet Explorer and any other browser does not allow automatic filling of fiels with the type "file". Typically these fields are used for uploading files. However, Internet Macros can work around this limitation with the WINCLICK statement. More details can be found in the "Demo-FileUpload" macro.

TYPE=HIDDEN: Hidden fields are not displayed in the browser, so the TAG lines for them can not be generated during normal recordeding. But you can add TAG lines with type "HIDDEN" manually to the macro and IIM will fill these hidden fields during replay! Example: "TAG POS=1 TYPE=HIDDEN ATTR=..."

TRAPPOPUP Trap a new browser window and send it to the main page. This command is generated by the IE plugin and can be used in both, the IE plugin and the IIM browser.

URL GOTO=http://www.iOpus.com
Navigate to a URL . If the URL is of type "exe" or "zip" the file is automatically downloaded. The download extensions can be defined with the !DEXT variable.

WAIT SECONDS=33
Wait (s) seconds

VERSION BUILD=303805
Version that created this macro. Example: 303805 corresponds to Version 3.03 (Build 805).

WINCLICK X=123 Y=111 CONTENT=Hello<SP>World
Triggers a "real" Windows click in the browser window. The advantage of this command is that it works with EVERY web page, even Java or Flash elements where the standard CLICK command fails. The CONTENT= attribute can be used to send text to the clicked element (e. g. if the clicked element is an input box) [PRO and SCRIPTING Editions only]


Automation

IIM has several features to support automation:

· LOOP Button [All Editions]
· Command line interface [PRO and SCRIPTING Editions]
· Scripting Interface [SCRIPTING Edition]


Shortcuts

You can create shortcuts to start IIM and automatically run a predefined macro.

To create a shortcut:

1. Locate "iimpro.exe" (This is the IIM browser. Typically this file is located in C:\Program Files\InternetMacros3 )
2. Right-click on "iimpro.exe" and select the "Create a Shortcut" option
3. Select the created shortcut "Shortcut to iimpro.lnk" and right click on it.
4. Select "Properties"
5. In the box Target you find an entry similar to "C:\Program Files\InternetMacros3\iimpro.exe"
6. Change this to "C:\Program Files\InternetMacros30\iimpro.exe" -macro yourmacro -noexit
7. Note: Do not change the path in the box "Start in"
8. Ready!

For a detailed explanation of the various command line options please see here.


Timer

Internet Macros is fully compatible with the built-in Windows task scheduler and any other task scheduler.

The Microsoft Task Scheduler is part of you Windows system. It "hides" in the "Control Panel" folder which is located in the "My Computer" folder on your desktop.

By using Task Scheduler, you can schedule tasks (such as iOpus Internet Macros or system tools like the Disk Defragmenter) to run at a time that is most convenient for you. Task Scheduler starts each time you start Windows, and runs in the background. With Task Scheduler, you can: Schedule a task to run daily, weekly, monthly, or at certain times (such as system startup).

What you enter in the RUN command box of the task scheduler will look like this example:

"D:\Program Files\InternetMacros\iimpro.exe" -macro mymacro

Tip: Alternatively you can point to a Batch file or Windows Scripting (VBS) file that contains the specific instructions to start the software. Thus you can conveniently execute several commands in a sequence.


Batch Files

Batch file examples are located in

C:/Program Files/InternetMacros3/Examples/Batch Files/

if you used the default installation path.

Command line options: [PRO / SCRIPTING Edition]

For Web professionals, the PRO Edition of Internet Macros can run "stand-alone" with a built-in Web browser. It supports command line options. This PRO version can be called from batch files, from scripting languages or any programming language that supports calling executable with command line options.
Note: Internet Macros works well with the free Windows Task Scheduler. More information on the Windows task scheduler is available on our Web site.

Command line syntax:

iimpro -macro MACRONAME -var1 <Content !VAR1> -var2 -datasource <filename> ...

Example: imacros -macro CmdLineTest -var1 Hello[SP]World! (this executes the CmdLineTest macro)

After completing the macro, the program automatically stops and closes. Note that in command lines you need to use the square brackets instead of the usual '<>' ones to denote a space [SP] or break [BR] otherwise Windows does not execute this command line correctly.
Internet Macros can be used with standard windows batch files. With batch files you can conveniently execute several Internet Macros in a sequence:

Example batch (*.bat) file:

echo Start Internet Macros batch file
iimpro -macro FormExampleMacro
iimpro -macro Check_Altavista
iimpro -macro Buy_Now!
echo Done!

Click here to open a simple example batch file, and here for one that uses the "-var" options.

Macro reuse with variables: Internet Macros also support the use of variables: !VAR1, !VAR2 and !VAR3. You can assign values to these variables with the "SET" or the "PROMPT" command.

Example - Use of variables:

PROMPT Enter<SP>variable: !VAR1 http://www.iOpus.com/iim.htm
SET !VAR2 nobody@nospam.iOpus.com
TAG TYPE=A ATTR=HREF:http://submit.searchengine.com/
TAG TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:name CONTENT={{!VAR1}}
TAG TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:email CONTENT={{!VAR2}}
TAG TYPE=INPUT:SUBMIT FORM=NAME:f1 ATTR=NAME:btnG CONTENT=

Real life Example Macro: Submit2Searchengine

NEW with Version 3: With the new command line switch -var_YOURVARIABLENAME you can create and use more then three built-in variables (up to 100).

Example: "-var_FIRSTNAME  Frank" will create the variable {{FIRSTNAME}} and fill it with the value "Frank".

Tip: If you want Internet Macros to read a value from the command line use the "CMDLINE" command:

Take values from the command line:

CMDLINE !VAR1 http://www.iOpus.com/iim.htm
SET !VAR2 nobody@nospam.iOpus.com
TAG TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:name CONTENT=Tom Tester!VAR1


Command Line Overview

Overview of available command line switches:

-macro mymacro
Set the macro name.

-loop <x>
Use the "LOOP" function instead of "PLAY". The number of loops is set to <x>. Example: with "-loop 20" the macro will run 20 times.

Tip: The Windows scripting interface allows you a much finer control over loops. Use for example:

set iim1= CreateObject ("iimwsh.iim")
i = iim1.iimInit
for m = 1 to 5
  i = iim1.iimPlay("mymacro")
next
i = iim1.iimExit

-noexit

If IIM is started via the "-macro" command line, IIM closes after the macro is completed. If you want to keep IIM open, use the "-noexit" switch. A typical use of this would be if IIM handles a login for you and you want to continue to work in the browser window.

-var1 Hello[SP]World!
-var2 Hello[SP]World!
-var3 Hello[SP]World!
-datasource mydatasource.

Set the built-in variables

-var_myvar Tom[SP]Tester
Create and define a new variable with the name "myvar". You can create up to 100 user defined variables.


Windows Scripting Host

IIM automatically installs a scripting interface (iimwsh.ocx): thus you can control Internet Macros with any programming languages that support ActiveX controls. Almost all Windows programming languages support this technology, including Visual Basic and the free Windows Scripting Host.

More examples are located in

C:/Program Files/InternetMacros3/Examples/Windows Scripting Host/

if you used the default installation path.

Windows Scripting Host Example:

(To run this example, copy this text in a file with the ending ".vbs", e.g. "test.vbs").

set iim1= CreateObject ("iimwsh.iim")
i = iim1.iimInit
i = iim1.iimSet("-var1", "Tom Tester")
i = iim1.iimSet("-tray", "")
i = iim1.iimDisplay("This is a test")
i = iim1.iimPlay("myfirstmacro")
If i > 0 Then
s = "Everything OK)
Else
s = iim1.iimGetLastMessage()
End If
MsgBox s

i = iim1.iimExit


Visual Basic

Visual Basic projects for Visual Basic 6 and VB.NET are located in

C:/Program Files/InternetMacros3/Examples/Visual Basic/

if you used the default installation path.


Scripting Commands Overview

Available scripting commands:

Note: All functions return a value > 0 if they succeed, and an error code < 0 in case of problems. You can use iimGetLastMessage to retrieve the text associated with the last error.

iimDisplay ("Hello")

This message is displayed in the Internet Macros browser. A typical usage would be to distinguish several running IIM browsers or display information on the current position within the script. If you want to hide the display so that you can manually trigger macros with the PLAY button please use iimDisplay ("#HIDEDISPLAY")

iimExit()

Close the Internet Macros browser

iimGetLastMessage()

Returns the text associated with the last error.
If the last command was iimPlay and if EXTRACT is used inside a macro iimGetLastMessage returns the extracted text. If the EXTRACT command can not find the extraction anchor, a "Extraction anchor not found (#EANF#)" message is returned. See iimPlay for more details.

iimInit()

Initialize the scripting interface.

Tip1: Use iimInit ("-tray") to start IIM in tray mode.

Tip2: If you want your script to connect to an already running instance of the IIM browser, use iimInit ("", FALSE). A typical use for this feature is if you manually log into a website and then start the script/macro to do some work on the currently active web page.

iimPlay ("mymacro")

Play the macro! After the macro has played all options that have been set with the iimSet command are reset.

Specific return values:

1: Macro completed without problems
2: Macro completed and data extracted,
Use iimGetLastMessage to get the extracted text. Please note that if one or more EXTRACT commands fail, the return code is also "2" but the string returned by iimGetLastMessage contains the #EANF# tag.

<0: Error encountered, use iimGetLastMessage to get the error message.

Important Error Return Codes:

-1 Macro timeout. The macro is not completed within the specified time. Default value is 600s (10 min). This value can be changed with iimSetInternal ("MACROTIMEOUT", <new value>).

-2 IIM Interface timeout: The IIM browser does not respond to the IIM browser. This error can happen when the IIM browser is very busy for a long time, for example while extracting a very large amount of data from a web page. The timeout default value is 10s. This value can be changed with iimSetInternal ("INTERFACETIMEOUT", <new value>).

-3 User pressed STOP button: The macro was stopped by a user that clicked the STOP button

-4 Communication error. The IIM browser did not receive the last command completely.

-5 IIM browser closed: The Scripting Interface can not find the IIM browser. Typically this happens if a user closes the IIM browser.

Error codes below -100 are error codes generated during the macro replay. These are the same error codes that you get during a manual macro replay.

iimSet ("-xx", "value")

Store values and settings that are used when Internet Macros is started. You can use exactly the same commands as for the command line interface. After iimPlay all settings are erased.

Example:
iimSet("-var1", "Tom") => Fills the variable{{!VAR1}} with Tom
iimSet("-var_ZIP", "44051") => Creates & fills the variable{{ZIP}} with "44051"
iimSet("-tray", "") => Activates the TRAY mode


How to buy Internet Macros

Order iOpus Internet Macros today
and enjoy instant delivery!

creditcards

Direct order link
http://www.iOpus.com/store.htm

Product Home page
http://www.iOpus.com/iim.htm

Email support
support@iOpus.com


Feature comparison

Compare the features of the different iOpus Internet Macros Editions.

A detailed feature comparison list can be found online at

http://www.iopus.com/iim-features.htm

If you are unsure which version is right for you, please ask us at support@iopus.com .

System requirements: Windows 98 or better, 64 MB Ram, 300 MHz PII or better, Internet Explorer 5.5 or better


Internet Macros Activation

Activating Internet Macros removes all restrictions of the trial version. For more information on how to purchase an activation key please click here.

iOpus Internet Macros Activation:

(1) Start the Internet Macros Browser ("iimpro.exe")

(2) Click on the EDIT tab

(3) Click on the "Buy & Activate" button

(4) In the popup that appears, enter your activation key and press the "Click to activate" button

(5) Click on the PLAY tab and choose EXIT

(6) Start Internet Macros again, the version is now fully activated!

Installation Tip: You need to install Internet Macros on an account with full administrator privileges, so the Internet Explorer add-in can be installed correctly. After the installation is complete, Internet Macros can be run on any kind of user account, including the "Restricted User" account on XP.


Free Updates

Your Internet Macros license includes FREE updates!

Once we release a new update simply download it from http://www.iopus.com/download.htm, install it and unlock it with your activation (license) key. All updates within a major release are FREE, e. g. if you purchased Version 3.0, the versions 3.1, 3.2 to 3.99 are free updates and you can use your "old" license key to unlock them.

If you want to be notified about new updates for Internet Macros and new iOpus Software, we recommend that you join our free NEWSLETTER mailing list: To subscribe visit our website at http://www.iopus.com/newsletter.htm and enter your email address.


How to print this help file

We do not recommend you to print this help file as the print capabilities of the Microsoft help viewer is rather scanty.

If you want a printed version of this help file, please download the online help in PDF format from the Internet Macros product home page

http://www.iopus.com/iim.htm


Frequently asked questions

If you have a problem with Internet Macros, or ask yourself "how do I do this or that...", please take a moment and look here:

http://www.iopus.com/iim-faq.htm


.topic 10 What is Internet Macros ? It is the first INTERNET-based macro recorder and a Web Scripting Powerhouse™. In a nutshell, it allows you to easily record web surfing and replay it. Web surfing is fun, but many tasks are repetitious: Checking on the same sites everyday, remembering passwords, submitting to search engines or testing web sites over and over again. With Internet Macros you record these tasks once and then let Internet Macros execute them whenever you need them. Any combination of browsing, form filling, clicking and information gathering can be recorded into an Internet macro. Internet Macros assists you during the recording with visual feedback. Do you need to test web sites? Have you ever thought that developing dynamic web applications was harder than it should be? Have you ever spent hours browsing over and over the same sequence of pages to test and correct an elusive bug? If so, then our advanced PRO and Scripting Editions are for you. The PRO Edition spots an easy-to-use command line interface and data merging support. In addition, the Scripting Edition allows you to interface Internet Macros with the Windows Scripting Host (included in Windows), Visual Basic or any other Windows programming language. How does Internet Macros Scripting Edition compare to the big name capture/replay testing tools on the market? Well, if you want a huge, complex tool with hundreds of menus, a proprietary built-in scripting language that requires a week long training course to understand - well, then Internet Macros isn't for you. But if want a light-weight software tool that is flexible, easy-to-use and supports the well-documented Windows Scripting Host then we think Internet Macros is perfect for you. iOpus Internet Macros SCRIPTING EDITION successfully competes with website testing software priced more than US$ 30,000 for only a fraction of the cost. What can "Internet Macros" do for you? The following list are only some examples of many possibilities. It can do (almost) everything that you can do with a web browser! If you are a power surfer, it can do the following: Automatically complete forms Auto-login to your email (and, if you want, also write and send the email for you!) Navigate complex websites repeatedly without user intervention. Transparent, transportable macro files: Record on one PC, replay on any other PC that has Internet Macros installed. (In contrast, the Microsoft AutoComplete entries can NOT be copied from one PC to another.) SECURE storage of passwords using the industry standard "BLOWFISH" encryption algorithm Keep your privacy: Unlike some other form filling tools Internet Macros does NOT send any data back to us. All data is only stored on YOUR local PC.. Share your macros with your colleagues and increase productivity for your whole organization. If you are a Web Professional, it can do the following: Regression test whole areas of complex web sites at the click of a button Automate your search engine submissions, manage Google and Overture Pay per Click search engine listings and bidding automatically, extract information from websites, query online-databases and download the results automatically,... Internet Monitoring: Watch your web site and alert you if the macro encountered a problem on your web site. In contrast to plain Internet Monitoring services, Internet Macros can test online forms of any complexity (e. g. create test orders in an Online store) including even Java and Macromedia Flash based elements. Measure website response times with the STOPWATCH command to create performance statistics. Avoid complicated Perl scripts, Cron jobs, grep, sed, awk, lwp and other time-consuming Unix tools and commands. In addition, none of these tools has the wide functionality that Internet Macros has! Internet Macros can be set to simulate Internet Explorer (IE) completely. In this mode it is NOT possible at all for a web server to distinguish between a normal (human) user and the Internet Macros robot. Extract any TABLE directly into a comma-separated text file. These files can be read by almost any spreadsheet software, including Excel. If you are a software developer, it can do the following: Extract data from web pages (web queries) Web enable your application in 5 minutes. You just have to write a macro and call the Internet Macros command line or Scripting interface. Internet Macros does the rest! Use Internet Macros as an Internet agent, robot or spider. Add "web surfing" and "web query" capability to your Windows Scripts Ship Internet Macros with your application. The Scripting Edition comes with a special redistribution license without royalty fees. You don't have time to create Internet Macros yourself? You need more complicated internet functions automated? We create customized solutions for you based on our award-winning innovative software. Please ask or a free quote! System Requirements Windows 98, ME, NT, 2000, or XP PC with 486 or higher processor (Pentium recommended) 8MB of free hard drive space for installation Microsoft Internet Explorer 5.5 or higher .topic 207870 iOpus Internet Macros is known for its intuitive user interface. The heart of the program tabbed interface on the left side of the IIM browser. A similar interface appears also in Internet Explorer after the IIM Plug-In is loaded. .topic 209070 START iOpus Internet Macros: IIM can be run in two versions (1) Internet Explorer Plugin After installing the software, a new icon called "IIM" appears in the menu bar of Internet Explorer (IE). Click this icon to start iOpus Internet Macros. If you have already customized your toolbar, you might need to add the icon to the Internet Explorer toolbar manually: 1. To add the icon, select VIEW > TOOLBARS> CUSTOMIZE 2. Select the Internet Macros icon and add it. 3. Done! The icon appears in the toolbar (2) The special Internet Explorer Browser [PRO and SCRIPTING Edition] To start this program, click on the icon on your desktop, or navigate to the file "iimpro.exe" and click on it. Tip: To get familiar with the Internet Macros, run the "Demo-FillForm" macro that is automatically installed. It demonstrates the basic features of IIM in an uncluttered way. It navigates to a test form, fills the form, sends it and goes back to the iOpus Internet Macro Website. .topic 209080 Select the "Record" tab strip of iOpus Internet Macros. Click record to start a recording. Now simply do what you want to record (surf to web sites, fill out forms, make a test order on your e-commerce site,...). After you are done recording, press STOP. The current recording is automatically saved as "#current" macro. Press SAVE to save it under an individual name. Hints for successful recording: A GREEN frame around a tag means that iOpus Internet Macros supports this tag. A RED frame around a tag means that you selected a web page element that is not useful for recording. These are mostly tags such as "BODY" that have no active functions. During recording, do NOT use your browsers BACK or FORWARD button or change the address line. Use the functions supplied by iOpus Internet Macros instead. [Internet Explorer Plugin only] Recording "Clicks": If a macro generates an error during replay, you can experiment by selecting the link recording option manually: 1. Automatic: Internet Macros attempts to choose the best recording options (recommended in most cases) 2. Use URL - The link is detected by its URL. If the URL changes each time you visit a page, this option is not recommended unless you replace the changing part of the URL with an "*". 3. Use Name - The link is identified by its name. Works well in most cases unless there are several links with the same name on a page. 4. Use XY - The link is identified by its position on the Web page. This can be useful if the name and URL of the item you want to click on changes dynamically from visit to visit. It should also be used if the Web page element is embedded in Java Script, so that Internet Macros can not find the recorded name during replay, because it was created "on the fly" by Java Script. 5. Use Windows Clicks: This is the ultimate solution if everything else fails: It simulates standard mouse clicks on the browser window. This feature works with ALL Web pages, but IIM needs to be in front during replay. This option is only available in the IIM browser. With the Fill & Merge Manager, you can automatically insert the {{Merge}} tags during recording. Since the Internet Macros recording language is fully documented, it is easy to edit and "tweak" the macro manually after recording! Security: All passwords are stored with strong, industry standard "Blowfish" encryption. If you store sensitive data (e. g. your email log-in password) inside the Macro, we strongly recommend that you change the default encryption password ("iopus2001") to your own password. To change the password, go to the OPTIONS dialog and enter your new password. You can also disable the password encryption, if you do, run test with non-sensitive passwords. The password encryption can be either disabled for all macros in the Option dialog of IIM or individually for each macro with the "SET !ENCRYPTION NO" command. Press "STOP" to end recording and SAVE to save the macro you just recorded. By default, the file is automatically saved as "#current" after the recording is completed. Upon saving, the macro is parsed and Internet Macros attempts to remove all double or multiple entries. iOpus Internet Macros supports two recording options: FAST (the default) and ORIGINAL SPEED. If you record in the original speed mode iOpus Internet Macros automatically generates WAIT statements so that the replay is at the same speed as your recording. This is useful for recording demos. For most purposes however, you want to replay the tasks a fast as possible. Tip: Be sure that you check our support page at http://www.iOpus.com/iim-support.htm for the latest recording tips & tricks or submit any recording problem at our online support form at http://www.iOpus.com/service/support.html . .topic 209230 Internet Macros automatically downloads and saves web pages for you. Web page download To save a web page insert the "SAVEAS" command into the macro, Options: (a) SAVEAS TYPE=FILE You can download web pages with the iOpus Downloader. The iOpus Downloader saves the HTML of the web page. Images are not saved. Also, since the iOpus Downloader creates a second (new) connections to the web page, it can fail in certain situations. where the second connection results in a different web page. Advantages: Simultaneous download and Internet Macros runs are possible Fast Disadvantage: Can fail in on certain websites (e. g. www.google.com) Note: This command can also used to save any type of file that is displayed in the browser. Normally this is a "HTML" type file (web page), but it can also be a picture (JPG, GIF, BMP,...). (b) SAVEAS TYPE=FOLDER This command invokes the internal Internet Explorer "SaveAs" command. So you will get exactly the same result as if you use the Internet Explorer "Save As" command. Web pages and images are saved. This command does not reload the web page. Advantages: Works on every website Images elements are saved Disadvantage: Only one macro can that uses this feature should run at a time Tip: The download directory can be changed with the "SET !DDIR c:\myfolder\" command. .topic 209240 Related example macros: Demo-FileDownload, Demo-ImageDownload Internet Macros automatically detects and intercepts download. The iOpus Downloader takes over and completes the download. Since the iOpus Downloader creates a second connection to the web server, it can fail on certain "tricky" web pages that do not allow a direct connection. In this case the "iOpus Popup Manager" takes over and completes the download. Normally the download file name is created automatically and consists of the download date, time and up to 30 characters of the web page title or file name (Example: "20020922_121511_iimfeatures.htm "). If you want to use a specific name for your download, you can set it with "SET !DFILE myfilename.htm" .This overrides the automatic file name generation. Tip: You can configure if or if not the iOpus Downloader intercepts a download. Example: SET !DEXT EXE*ZIP*MP3 Now the downloader only downloads files with an "exe", "zip" or "mp3" extensions. Tip 1: The download directory can be changed with the "SET !DDIR c:\myfolder\" command. Tip 2: If you want to download images or similar elements, please read here. Tech Tip (Advanced): You can edit the default settings for the Downloader by changing the list directly in the "iim.ini" file: (1) Stop & close iOpus Internet Macros (IIM) (2) Locate "iim.ini". This file is typically located in "C:\Documents and Settings\\Application Data\iOpus-I-M". [Note: Since this is a system directory, it is "hidden" by default. Note: In most file managers (e.g. the Microsoft Windows Explorer) you need to enable the "display hidden / system files" option (or similar function) in order to see this directory. In the MS Explorer this option is located at View > Folder Options > View Tab > Go to the "Hidden Files" option and select "Show all"] (3) Open "iim.ini" with a text editor (e. g. notepad. exe) and change the following line DownloadFileTypes=EXE*ZIP*PDF*XLS*DOC*RTF*AVI*WAV*MP3 to DownloadFileTypes=EXE*ZIP*MP3 (4) Save the changes (5) Restart IIM for the new settings to take effect. .topic 209340 Related example macro: Demo-ImageDownload To download an image (or any other specific web page element) switch to recording mode, navigate to the page and press "Save item". The item download window opens. Now select the image (or item) in the web browser window. The selection is displayed in the item download window for preview. If you like the selection, press ok. The item download manager automatically adds a TAG line to your macro: TAG POS=1 TYPE=IMG ATTR=HREF:http://www.iopus.com/logo.jpg CONTENT=EVENT:DOWNLOAD You can also create download tag lines manually: Simply add CONTENT=EVENT:DOWNLOAD to a normal TAG line. The downloaded files are copied to the Internet Macros download directory. The items are taken directly from the web browser that displays them. They are NOT downloaded again to save time and bandwidth. The naming convention for downloaded images is the same as for downloaded files. This also means you can use "SET !DDIR" and "SET !DFILE" to specify your name for the downloaded image. For a demo of this feature, please run the "Demo-ImageDownload" macro. .topic 209090 Replay Options: Select a macro from the list and press PLAY. During replay the cursor frame is blue. To run IIM in the background, click on the "Tray" button [IIM Browser only]. To replay the recorded sequence several times fill in the number of loops and press START LOOP. There are four different options for the replay speed: FAST - replay macro at maximum speed (Recommended in most cases) MEDIUM - wait 0.25s between each step SLOW - wait 1s between each step ORIGINAL - Replay macro at the recording speed. If you choose this option, IIM inserts WAIT statements during the macro recording process. The replay speed is changed on the first tab of the options dialog. It can be also changed inside the macro with the !REPLAYSPEED variable. Errors during replay: We work hard to make Internet Macros as "intelligent" as possible, but it still is not as smart as you are: If an error occurs during replay it is mostly due to a "tricky" Web page at which one of the automatic suggestions of the Internet Macros Recorder failed. In almost all cases re-recording with different settings or manually editing the macro solves the issue. For recording tips please see "Recording" and for information on how to edit your macro go to the "Edit Macros" section. .topic 209210 Click on the "Fill & Merge" button to open the "Fill & Merge" manager. It allows you to easily edit your data sources. It also can be used like a standard form filler to fill documents directly with the VALUE of a variable, or to insert the {{VARIABLE}} itself into the document to create a macro for later merging with the data source. .topic 209100 Advanced features help you to fine-tune your Internet Macros. .topic 209110 Related example macros: Demo-Tagposition The recorded macro is stored in an easy to read text file and you can manually edit and "tweak" the macros. For example, you could change the content of a form field. Example: To change the Name of "Tom Tester" in the FormExampleMacro to "Dr. A. Award" locate the "TAG" command that contains the "Tom Tester" entry and change it as demonstrated below: Old: TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:n1 CONTENT=Tom Tester New: TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:n1 CONTENT=Dr.A.Award indicates a " " (space). Tip: The default editor for editing Internet Macros is "Windows Notepad" (notepad.exe). If you prefer to use another editor you can change the default editor in EDIT tab > click OPTIONS > PATHS tab. .topic 209320 Related example macros: Demo-Datasource, Demo-Slideshow There are three kinds of variables in Internet Macros: 1. Built-in variables These variables are used to define certain properties of the macro behavior, for example the macro timeout value: SET !TIMEOUT 33 A complete list of all built-in variables is available. 2. !VAR1, !VAR2, !VAR3 These there variables can be defined with the set command SET !VAR1 helloworld and later you can use these variable in any place inside the macro 3. User-defined Variables [PRO and SCRIPTING Edition] These variables are created "on the fly" by the command line switch "-var_MYVAR ". Example: -var_ITEM 15 creates the variable {{ITEM}} and gives it the value 15. These variables can be part of ANYTHING inside the macro. For example, you can add them as part of the "ATTR=" string in a TAG or EXTRACT command or as part of the GOTO statement. Example: URL GOTO=https://www.myonlinestore.com/?shoppingcart={{cartnumber}}&item={{item}} .topic 209330 Related example macros: Demo-Winclick, Demo-FileUpload The WINCLICK command is the ultimate solution if everything else fails: It simulates standard mouse clicks on the browser window. This feature works with ALL Web pages, but IIM needs to be in front during replay. This command is only available in the IIM browser. Example: WINCLICK X=200 Y=263 CONTENT= The WINCLICK command can also send keystrokes to the web browser via the CONTENT= attribute: Here is an example on how to send text: 'The pointer would interfere with sending text: '=> Disable the position pointer temporarily SET !POINTER NO 'First click on the input field to get the FOCUS WINCLICK X=200 Y=263 CONTENT= 'Now send the keystrokes to the field WINCLICK X=200 Y=263 CONTENT=MyText You can also send special keys: BREAK {BREAK} CAPS LOCK {CAPSLOCK} DEL or DELETE {DELETE} or {DEL} DOWN ARROW {DOWN} END {END} ENTER {ENTER} or ~ ESC {ESC} HELP {HELP} HOME {HOME} INS or INSERT {INSERT} or {INS} LEFT ARROW {LEFT} NUM LOCK {NUMLOCK} PAGE DOWN {PGDN} PAGE UP {PGUP} PRINT SCREEN {PRTSC} RIGHT ARROW {RIGHT} SCROLL LOCK {SCROLLLOCK} TAB {TAB} UP ARROW {UP} F1 {F1} F2 {F2} F3 {F3} F4 {F4} F5 {F5} F6 {F6} F7 {F7} F8 {F8} F9 {F9} F10 {F10} F11 {F11} F12 {F12} F13 {F13} F14 {F14} F15 {F15} F16 {F16} To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes: Key Code SHIFT + CTRL ^ ALT % To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC". To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 19} means press the LEFT ARROW key 19 times; {h 10} means press H 10 times. .topic 209120 Related example macros: Demo-Datasource, Demo-ReadCSV, Script: Datasource-2-web.vbs, CSV-2-web.vbs, Database-2-web.vbs If you want to submit different information to the same Web page (i. e. using the same Internet Macro) you can use the DATA MERGING functions. An example would be if you want to submit an online ad to different web sites. The data source can in two different formats: Either a text file with a list of variables and their values of the form "variable_name=value" or as a comma separated text file (CSV format). A text file in CSV format can be generated by Microsoft Excel and many other applications. As a rule of thumb the "list of variables" format is recommend if you have may different variables but only one or a few value for each variable (for example your detailed address data that you use to fill out online forms). The CSV format is most appropriate for use with a few variables with may different values (for example a long list of CD's that you want to submit to an auction web site). Tip: Data merging and command line: Specify the data source using the "-datasource" command line parameter: iimpro -macro data-merge-example -datasource dinner.txt .topic 209370 Related example macros: Demo-ReadCSV, Script: CSV-2-web.vbs, Database-2-web.vbs Internet Macros allows you to specify a text file with comma separated values as input, for example: "ARTIST" , "ALBUM TITLE" , "PRICE" "Beatles", "Abbey Road", "13.49" "Beatles", "The Beatles 1,2,3" , "25.49" "Mozart" , "Symphonies No.40 & 41", "9.98" "Mozart", "Requiem", "7.50" Note: Quotation marks "" are optional in most cases. They are only required if the value itself contains a comma. Important: If you read data from a datasource in "CSV" format, the variable names must be of the format !COL1, !COL2, ...,!COL10 for the values of column 1, 2,...10 of the input file. You can not use user defined names like if you use the "List of Variables" format as input. The Internet Macros file contains the location of the data files: SET !DATASOURCE OnlineAuction.csv SET !DATASOURCE_COLUMNS 3 SET !DATASOURCE_LINE {{!LOOP}} TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Name CONTENT={{!COL1}} TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Album CONTENT={{!COL2}} TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Price CONTENT={{!COL3}} With the "SET !DATASOURCE_COLUMNS 3" you specify the number of columns in the input file (3 in our example). This number must match the exact number of columns in the input file, even if you do not usee some columns. With SET !DATASOURCE_LINE {{!LOOP}}you tell IIM which line of the file to read. In our example we use the !LOOP variable read the next line in the input file with each loop. During the execution of the macro, the constants in parentheses {{..}} are replaced by the value specified in the data sources. The file name of the data source is stored in the variable !DATASOURCE. This variable can be filled from the command line if required. .topic 209360 Related example macros: Demo-Datasource Script: Datasource-2-web.vbs Create plain text file(s) that contain the information you want to submit. In this example we create two text files. One contains the information on ordering a "lunch" and the other one is used for ordering "dinner". Data source No. 1: (Data sources are located in the /datasource sub-directory of the Internet Macros directory) lunch.txt could look like this: [iOpus] name=Mr.Tester main=2 drink=2 smallsizedrink=NO myremarks=Delivertooffice Data source No. 2: dinner.txt could look like this: [iOpus] name=TomTester main=1 drink=1 smallsizedrink=NO myremarks=Delivertohomeaddress:
16294thAvenue
Thanks!
Tom The Internet Macros file contains the location of the data files: CMDLINE !DATASOURCE lunch.txt TAG TYPE=INPUT:TEXT FORM=NAME:TestForm2 ATTR=NAME:Name CONTENT={{name}} TAG TYPE=SELECT FORM=NAME:TestForm2 ATTR=NAME:main CONTENT={{main}} TAG TYPE=SELECT FORM=NAME:TestForm2 ATTR=NAME:drink CONTENT={{drink}} TAG TYPE=INPUT:CHECKBOX FORM=NAME:TestForm2 ATTR=NAME:C8&&VALUE:ON CONTENT={{smallsizedrink}} TAG TYPE=TEXTAREA FORM=NAME:TestForm2 ATTR=NAME:Remarks CONTENT={{myremarks}} During the execution of the macro, the constants in parentheses {{..}} are replaced by the value specified in the data sources. The file name of the data source is stored in the variable !DATASOURCE. This variable can be filled from the command line as well: Tips: Tip 1: If you want Internet Macros to read different values for each loop, add a number at the end of the data value name and add !LOOP to the end of the name inside the macro: Example: The datasource can look like: [iOpus] name1=TomTester name2=AnnSmith name3=NicoleFrank main1=2 main2=1 main3=3 and in the macro you use: TAG TYPE=INPUT:TEXT FORM=NAME:TestForm2 ATTR=NAME:Name CONTENT={{name!LOOP}} TAG TYPE=SELECT FORM=NAME:TestForm2 ATTR=NAME:main CONTENT={{main!LOOP}} You can specify the starting value of a loop with "SET !LOOP x" , x is the number of loops. For another example on how to loop through a larger dataset, please see the "database-2-web.vbs" example windows script. Tip 2: With the Fill & Merge Manager, you can automatically insert the {{Merge}} tags during recording. .topic 209350 Related example macro: Demo-NewWindow Many websites open popup windows. In many cases these are just annoying advertisements that can be safely ignored but often these popups also contain important functions (e. g. a spell checker message, a more detailed explanation of an topic or the request for additional information). Internet Macros can handle all cases: During macro recording all HTML popups are trapped and you are asked what to do with them: (1) Ignore the popup: In this case you do not need to do anything, unless you tell Internet Macros otherwise, popups are automatically ignored during a macro replay. This feature is often called "popup killer" or "popup filter". (2) Continue recording in popup: The popup contains information and buttons that you want to handle: If you click this button a "GOTOPOPUP" statement is inserted into the macro before the statement that triggered the popup. After you are done recording activity in the popup click "Done with popup" to go back to the main page. A LEAVEPOPUP statement is added to the macro code. [Only IIM-Browser, PRO/SCRIPTING Edition] (3) Make popup the new main page: Typically this open is used if the new window is not a typical popup but rather a new "real" web page that opens in a new window. Internet Macros can trap this new browser window and send it to the main page. If you choose this option, a TRAPPOPUP statement is inserted in the macro code. .topic 209130 Related example macro: Demo-OnPopup, Demo-DebugPopup The Window Popup Manager allows you to manage all these pesky popups that appear with Internet Explorer from time to time (Since the IIM Browser emulates Internet Explorer, the same popups appear there as well). Please note: This function refers to standard Windows popups (for example Java Script based popups or Internet Explorer error messages). It does NOT refer to the web browser popups. Web browser popups are handled with the "TRAPPOPUP" command. The Popup Manager (PM) automatically handles the standard "Save As", "Download" and "Script Error" popups. For non-standard popups, for example: a web-site specific Java Script popup, it asks you which button PM should press for you. After you make your selection PM presses the Button for you and inserts a "ONPOPUP BUTTON =" statement into the macro file. Please note that the PM can only watch ONE running Internet Macros session. The PM is automatically assigned to the Internet Macro session that starts first. So if you have five Internet Macros Browsers open, PM will communicate with the one that was started first. So we recommend that whenever the Popup Manager is in use, only one macro that needs this functionality should run at a time. Other macros that make no use of the Popup Manager can run simultaneously. Tip: If the website you are automating contains several popups in a short succession, please add a "ONPOPUP BUTTON=..." before every TAG or URL command that triggers a popup. At every "ONPOPUP..." command IIM checks if a PM is running and (if not) restarts the PM. This ensures that even on slower PCs the PM is "ready to click" before the (next) PM appears. Note: Should you encounter any popup that Internet Macros can not handle, please notify us at support@iopus.com so that we can support it with the next update. Note: More details about handling script errors can be found at http://www.iopus.com/iim/demo/script-error.htm .topic 209220 Related example macro: Demo-Stopwatch Web site response time measurement is important. With the STOPWATCH statements Internet Macros allows you to measure the time that elapses between the first occurrence of this statement in a macro (= stopwatch on) and the second occurrence ( = stopwatch off). By using different id's in the stopwatch command you can create up to a 100 independent measurement points in your macro. You need to insert the STOPWATCH statements manually after you recorded your macro. For accurate measurements it is important to set the browser replay speed to "FAST", so no artificial delays are added. Example: VERSION BUILD=303725 SET !FILESTOPWATCH mydata.csv STOPWATCH ID=total URL GOTO=http://www.iopus.com/iim/iim.htm STOPWATCH ID=1 TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/iim-features.htm STOPWATCH ID=1 STOPWATCH ID=store TAG POS=1 TYPE=A ATTR=TXT:US$149 TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:order ATTR=NAME:ORDER_PRODUCT_NOW&&VALUE:OrderNow TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/store.htm STOPWATCH ID=store STOPWATCH ID=total The file "mydata.csv" contains the measurement data. By default, the data is saved to the /download directory. The values are comma separated (CSV format) so it can be viewed with any text editor or imported directly in Excel or any other software you use to view your data. Example file: Format: Date, Time, Macro name, ID, time (s) "2002/08/3","11:56:23","mymacro","1","1.272" "2002/08/3","11:56:32","mymacro","store","8.943" "2002/08/3","11:56:32","mymacro","total","10.21" Tips for accurate measurements: 1. Add a CLEAR statement to your macro. This way you make sure that the browser cache is cleared before each run. Otherwise IIM might read the web pages from the cache and not the web server (If the cache is actually used, depends on the Internet Explorer settings.). 2. Run the measurements as a loop and average several runs. The "internet speed" can fluctuate from minute to minute even on a fast connection. Therefore differences between each measurement are normal. To get stable results, it is good practice to average several runs. For example, EXCEL can create averages automatically for you. 3. If you compare results between different PC's, please keep in mind that (as with all time critical software) the accuracy depends on the accuracy of the PC clock. Under normal conditions the processor speed should not influence the measured response times, unless the PC is so slow that the web page rendering of the browser and the IIM parsing is slowed down. .topic 209380 Internet Macros can extract data from Web sites. Click on the EXTRACT button while in recording mode to bring up the extraction wizard. Note: Internet Explorer 6.0 or better installed is required for the EXTRACT command. To define an EXTRACT tag, proceed as follows: (1) Open the Extraction Wizard (EXTRACT button on control panel). I Note: If the information you want to extract is inside a framed web site, you need to click inside the frame that contains the information you want to extract before opening the Extraction Wizard. This generates the FRAME command and marks the frame as active for the extraction. (2) In the browser window or frame, select the text that you want to extract. (3) Click the "Suggest" Button. IIM creates a suggestion for the extraction anchor of the extraction tag. IIM later uses this anchor to return to the position where you want to extract text. (4) Click TEST to test run the extraction tag. (5) If you are satisfied with the result, click "Add" to add the EXTRACT statement to the macro. If you extract a complete table, the table data is automatically converted into comma-separated data (see the "demo-extract-table" macro). This is a very powerful feature. It allows you to get the data of a complete table with only one command! There are two methods to retrieve extracted data: 1. You can save extracted data directly to a file by adding "SAVEAS TYPE=EXTRACT" manually to the macro. All items that were extracted before the SAVEAS command are saved to a file in one row like "item1 , item2 , item 3, ...". With the next start of the macro or the next round of a LOOP, a new line is added to the file. The default file name is "extract.csv". The file name can be changed with "SET !FILEEXTRACT newname.txt". 2. If you do not use a "SAVEAS TYPE=EXTRACT" command in the macro, IIM returns the data to your code via the Scripting Interface. Tip: Sometimes IIM can not suggest a proper EXTRACT tag automatically. In this case you can create one manually and test it with the TEST button in the Extraction Wizard. Note: If one or more EXTRACT command are present in a macro, the return code is "2" if the macro completed successfully, even if one or more of the EXTRACT command failed because the extraction anchor was not found. Typically this happens because the web page changed. The reason for this behavior that a macro can have many EXTRACT command and often (only) one of them does not find the extraction anchor. In this case the string "#EANF#" is returned. "EANF" stands for "Extraction anchor not found". So if you want to check if a particular EXTRACT command was successful, you just need to check if "#EANF#" is present in the returned string. Often, this can be very useful, for example if you use EXTRACT to check if a keyword is present on a page. A returned string with #EANF# in it, indicates then that the keyword is not found. The text of a popup can be extracted with EXTRACTPOPUP. Add this command to your macro after the TAG command that triggers the popup. Note 1: You can also extract values from INPUT boxes or SELECT (drop down lists) as well. For SELECT boxes, the currently active value is extracted. If you want to select ALL values of a drop down list, manually add #ALL# before the attribute. Example: Select currently active values: EXTRACT POS=1 ELEM=0 ATTR=size=1name=main>* Select all values in a list: EXTRACT POS=1 ELEM=0 ATTR=#ALL#size=1name=main>* Note 2: Some web pages make use of a "
" in their HTML code. It marks the text as "preformatted" -- all the spaces and carriage returns are rendered exactly as you type them. The information inclosed in a
 tag is extracted correctly (including the formatting!) by Internet Macros. Thus if you transfer the extracted data to via the Scripting Interface all formatting information is retained unchanged. The formatting is only changed on two occasions: During the display in the test dialog box the line breaks are removed. The line breaks are also removed if you use the SAVE TYPE=EXTRACT method. This is necessary to ensure proper formatting of the CSV formatted text file, as in the CSV format, a line break would start a new line.

Example 1:

HTML page:

Hello World
Text to be extracted
Good Morning
Good Afternoon
(c) iOpus

To extract the text "Text to be extracted" you use

EXTRACT POS=2 ELEM=0 ATTR=*

The POS=2 statement indicates that Internet Macros must search for the second occurrence of the extraction anchor on the web page. The ATTR tag contains the HTML extraction anchor, in this case a simple tag plus the wild card symbol "*".  IIM searches for this tag and extracts the content found there. (ELEM is always 0, this value is reserved for later use.)

Important: You MUST use "*" at the end of the extraction anchor to tell Internet Macros that it should ignore the rest of the element when searching for the anchor. Other possible extraction anchors in this case could be "Te*" or "Textto*". But they are not recommend because they will fail if "Text to be extracted" is changed to "Data to be extracted" on the web page.

Example 2:

HTML:
  • Salary:33,000.00 per year
    •

EXTRACT POS=1 ELEM=0 ATTR=face=Verdanasize=-1>Salary:*

In this example we have a longer extraction anchor. As you can see, you basically cut the HTML in half to get the extraction tag and add "*" at the end. You can add "*" at multiple locations if required:

EXTRACT POS=1 ELEM=0 ATTR=face=*size=*>Salary:*

Since the extraction anchor occurs only once on the Web page, POS has the default value of 1. The elements
  •  and  are not used for comparison. The word "salary" is fixed and can be used as part of the extraction anchor. The extract text is "Salary: 33,000.00 per year".

.topic 209390
Related example macro: Demo-Extract-Table

To extract a complete table as comma separated file and save it directly to your hard disk you can use:

EXTRACT POS=3 ELEM=0 ATTR= 0 then
          MsgBox ("Sorry, keyword not found")
   else
         iplay = iim1.iimPlay("print_this")
   End If
End if
If iplay < 0 Then
       MsgBox "Error!"
End If

More Examples:

Internet Macros comes with several example scripts that demonstrate the EXTRACT command:

extract-2-file.vbs
extract-and-fill.vbs
get-exchange-rate.vbs

The scripts are found in the "Examples\Windows Scripting Host" directory. More example scripts and test pages are available at http://www.iOpus.com/iim/demo

.topic 209260
Macro Commands

'  <==
If a line starts with " ' " everything behind the " ' " is ignored. Typically this is used for comments or to disable specific parts of a macro.

BACK
Go BACK one step

CLEAR
Clear browser cache AND cookies. Useful for example to delete Web site cookies so every macro run starts at the some point.

CLICK X=123 Y=111 CONTENT=ABC
"Clicks" on the element at the specified X/Y coordinates. In contrast to WINCLICK, this click can be run in background mode. The optional CONTENT= attribute can be used to send text to the clicked element (e. g. if the clicked element is an input box)

CMDLINE
Set the variable to a value retrieved from the command line. Use the-var1, -var2 and -var3 switches to set the variables from the command line.

DISCONNECT
Disconnect the current dial-up connection.  Tip: On Dial-Up connections DISCONNECT & REDIAL can be used to change IP addresses.

EXTRACT POS=1 ELEM=0 ATTR=(Anchor*)
Extract data from websites. Please note that the anchor normally ends with "*". (ELEM is always 0, this value is reserved for later use)

FRAME F=
Directs all following TAG or EXTRACT commands to the specified frame. The frame tag and number is automatically generated by clicking into a framed web page. Example macro: "Demo-Frames.iim"

 EXTRACTPOPUP
Extract data from a popup. The text of a website popup is extracted. The text is processed the same way as standard EXTRACT text.

 GOTOPOPUP
Continue recording inside a popup. [IIM Browser only]

 LEAVEPOPUP
Close popup and go back to main page. [IIM Browser only]

ONPOPUP BUTTON=OK
Instructs the Popup Manager to click the [OK] button for the next popup. This settings remains valid until changed with another "ONPOPUP" command.

PRINT
Print the current browser window.
Tip: If you want to print PDF files with the Acrobat Reader Plug-In, you need to add a "ONPOPUP BUTTON=OK" command before the PRINT statement.

PROMPT
Display a popup to ask for a value. This value is stored in the variable.

Note: This command can be used with variables !VAR1, !VAR2 or !VAR3, but not with built-in variables like !DATASOURCE or dynamically generated variables from the "-var_X" command.

REDIAL YourISP
Redial a connection. "YourISP" is the name of your dialup connection as it appears in the Windows dialup selection.

REFRESH
Refresh (Reload) current browser window

SAVEAS TYPE=FILE
Save the file that is currently displayed in the browser. Typically this is the current Web page (HTML file) but it can also be a graphics file. A date & time stamp is automatically added to create a unique file name

SAVEAS TYPE=FOLDER
Save the current Web page, including graphics. A date & time stamp is automatically added to create a unique file name. This command brings up a "Save As" dialog that is handled by the Popup Manager.

SAVEAS TYPE=EXTRACT
Save extracted data to a file. This command must be used after the extract command itself. If several EXTRACT commands are used within one macro, the content is appended to the file. If a new macro is started, any file content is overwritten. The file name is defined with "SET !FILEEXTRACT yourfile.csv".

SET
SET
This command sets the variable !VAR1, !VAR2 or !VAR3 or one of the built-in variables to a certain value. Note: This command can be used with variables !VAR1, !VAR2 or !VAR3 or one of the built-in variables, but not with the dynamically generated variables from the "-var_X" command.

Available built-in variables:

Variable Name & Purpose

!DATASOURCE Input file for merging data with macro. Example: SET !DATASOURCE c:\mysource.txt

!DDIR Download directory. Overrides the default download directory: Example: SET !DDIR c:\mynewdir\

!DEXT Download extensions. Change the file extensions that trigger the iOpus downloaded: Example: SET !DEXT exe*zip*mp3*csv*pdf
For permanent changes you can edit the default settings in the "iim.ini" settings file.

!DFILE Download file name. Normally this name is created automatically and consists of the download date, time and 30 characters of the web page title or file name. If you want to use a specific name for your download, you can set them with "SET !DFILE myfilename.htm".

!ERRORMACRO Overrides the global error macro setting in the option dialog for the current macro

!ERRORIGNORE (YES/NO) Tells IIM to ignore errors that can be safely ignored. For example TAG commands that are not found on the Web page.

!ENCRYPTION (YES/NO) Can be used to disable the use of password encryption for the current macro. Applies only to password fields on a Web page. (Password fields are the ones where words are displayed using asterisks ****).

!EXTRACT_TEST_POPUP (YES/NO). Set this value to NO to disable the extract testing popup that appears by default if you run a macro with an extract popup directly and not by using the command line or scripting interface.

!FILESTOPWATCH Set the file name for the file that contains the stopwatch measurement data. By default the file name is "stopwatch.csv" and is located in the download directory. You can use a name or a fully qualified path name. Example: SET !FILESTOPWATCH mynewfile.txt

!FILEEXTRACT Set the file name to save extracted data. By default the file name is "extract.csv" and is located in the download directory. You can use a name or a fully qualified path name. Example: SET !FILEEXTRACT mycurrency.txt .Alternatively you can use the Scripting Interface to access the extracted data.

!LOOP Counts the current loop in loop mode. Especially useful together with the POS=... attribute of the TAG command. See for example the "Demo-Slideshow" macro. With SET !LOOP 3 you can set a start value for the loop counter (the default value is 1). This is useful when you use the {{loop}} variable inside you macro and want to start with a value different from 1. SET !LOOP is ignored for every loop run except the first one.

!POINTER (YES/NO) Disable the pointer (blue frame) that marks the current position during a macro replay.

!POPUPMANAGER (YES/NO) Activate or stop the Windows Popup Manager (Do not confuse this with the HTML popup manager). Example: If you want your users to handle the print dialog manually, you can use SET !POPUPMANAGER NO before the PRINT command.

!REPLAYSPEED (1/2/3) Set the replay speed to fast(1), medium(2) or slow(3).

!TAGCHECK YES/NO: Switch the check for completed loaded web sites off. See for example Demo-FillVariousWebsites.

!TIMEOUT New timeout value in seconds. Overrides the Internet macro default value. Example: SET !TIMEOUT 150

!URLSTART The url that was active in the browser when the macro started. Typically used to go back to the start page inside the macro.

SIZE X=730 Y=655
Resize the IIM Browser Window (width, height in pixels). In Internet Explorer, this command is ignored. [PRO and SCRIPTING Editions only]

STOPWATCH ID=MyName
Web site response time measurement. By default, the measured data is stored in the download directory of Internet Macros. You can change the file location with the !FILESTOPWATCH variable. [PRO and SCRIPTING Editions only]

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:TestForm2 ATTR=NAME:Name CONTENT=TomTester

TAG POS=3 .....
TAG POS={{!LOOP}}
The TAG command:
Syntax: TAG TYPE= FORM=
     ATTR= CONTENT=
Example: This line fills an INPUT field with the name "name" with the text "Tom Tester"

Sometimes a web page can contain links with the same text, e. g. many links with the name "Download". This command tells IIM, to not use the first link it finds, but - for example - the 3rd link. When combined with the !LOOP variable it can be used to process on link after the other.

Special TAG commands for TYPE=SELECT:

By default, the CONTENT attribute of TYPE=SELECT stores the position (also called index) of value. But you can manually edit this to select ALL values of a multiple selection box. Also, to select the values by name add "$" before the name). Spaces must be written as . The comparison is case insensitive and wild cards like "*" can be used.

Example:
CONTENT=2:4   <= Normal selection (the position of a value is stored)
CONTENT=$ApplePie:$Fruits   <= Selection by name (add $ before the name)
CONTENT=$*apple*:$FRU*" <= Selection by name (wild cards, case insensitive comparison)
CONTENT=ALL <= select ALL values of a selection. Useful if the number of values changes dynamically

Special TAG commands for non-input fields (like the types A (link), B(bold) or IMG (image)):

Instead of a click on the element you can also ask IIM to fire other events, for example trigger a "mouseover" event to display a menu item. To do this, add a CONTENT attribute to the TAG line. Often  these events are used to trigger Javascript menu items.
Example:
TAG POS=1 TYPE=IMG ATTR=HREF:http://www.iopus.com/images/menu1.gif   CONTENT=EVENT:#MOUSEOVER

TYPE=FILE: Internet Explorer and any other browser does not allow automatic filling of fiels with the type "file". Typically these fields are used for uploading files. However, Internet Macros can work around this limitation with the WINCLICK statement. More details can be found in the "Demo-FileUpload" macro.

TYPE=HIDDEN: Hidden fields are not displayed in the browser, so the TAG lines for them can not be generated during normal recordeding. But you can add TAG lines with type "HIDDEN" manually to the macro and IIM will fill these hidden fields during replay! Example: "TAG POS=1 TYPE=HIDDEN ATTR=..."

TRAPPOPUP Trap a new browser window and send it to the main page. This command is generated by the IE plugin and can be used in both, the IE plugin and the IIM browser.

URL GOTO=http://www.iOpus.com
Navigate to a URL . If the URL is of type "exe" or "zip" the file is automatically downloaded. The download extensions can be defined with the !DEXT variable.

WAIT SECONDS=33
Wait (s) seconds
VERSION BUILD=303805
Version that created this macro. Example: 303805 corresponds to Version 3.03 (Build 805).

WINCLICK X=123 Y=111 CONTENT=HelloWorld
Triggers a "real" Windows click in the browser window. The advantage of this command is that it works with EVERY web page, even Java or Flash elements where the standard CLICK command fails. The CONTENT= attribute can be used to send text to the clicked element (e. g. if the clicked element is an input box) [PRO and SCRIPTING Editions only]

.topic 209160
IIM has several features to support automation:

LOOP Button [All Editions]
Command line interface [PRO and SCRIPTING Editions]
Scripting Interface [SCRIPTING Edition]

.topic 209290
You can create shortcuts to start IIM and automatically run a predefined macro.

To create a shortcut:

1.	Locate "iimpro.exe" (This is the IIM browser. Typically this file is located in C:\Program Files\InternetMacros3 )
2.	Right-click on "iimpro.exe" and select the "Create a Shortcut" option
3.	Select the created shortcut "Shortcut to iimpro.lnk" and right click on it.
4.	Select "Properties"
5.	In the box Target you find an entry similar to  "C:\Program Files\InternetMacros3\iimpro.exe"
6.	Change this to "C:\Program Files\InternetMacros30\iimpro.exe"  -macro yourmacro -noexit
7.	Note: Do not change the path in the box "Start in"
8.	Ready!

For a detailed explanation of the various command line options please see here.

.topic 209280
Internet Macros is fully compatible with the built-in Windows task scheduler and any other task scheduler.

The Microsoft Task Scheduler is part of you Windows system. It "hides" in the "Control Panel" folder which is located in the "My Computer" folder on your desktop.

By using Task Scheduler, you can schedule tasks (such as iOpus Internet Macros or system tools like the Disk Defragmenter) to run at a time that is most convenient for you. Task Scheduler starts each time you start Windows, and runs in the background. With Task Scheduler, you can: Schedule a task to run daily, weekly, monthly, or at certain times (such as system startup).

What you enter in the RUN command box of the task scheduler will look like this example:

"D:\Program Files\InternetMacros\iimpro.exe" -macro mymacro

Tip: Alternatively you can point to a Batch file or Windows Scripting (VBS) file that contains the specific instructions to start the software. Thus you can conveniently execute several commands in a sequence.

.topic 209170
Batch file examples are located in

C:/Program Files/InternetMacros3/Examples/Batch Files/

if you used the default installation path.

Command line options: [PRO / SCRIPTING Edition]

For Web professionals, the PRO Edition of Internet Macros can run "stand-alone" with a built-in Web browser. It supports command line options. This PRO version can be called from batch files, from scripting languages or any programming language that supports calling executable with command line options.
Note: Internet Macros works well with the free Windows Task Scheduler. More information on the Windows task scheduler is available on our Web site.

Command line syntax:

iimpro -macro MACRONAME -var1  -var2 -datasource  ...

Example: imacros -macro CmdLineTest -var1 Hello[SP]World! (this executes the CmdLineTest macro)

After completing the macro, the program automatically stops and closes. Note that in command lines you need to use the square brackets instead of the usual '<>' ones to denote a space [SP] or break [BR] otherwise Windows does not execute this command line correctly.
Internet Macros can be used with standard windows batch files. With batch files you can conveniently execute several Internet Macros in a sequence:

Example batch (*.bat) file:

echo Start Internet Macros batch file
iimpro -macro FormExampleMacro
iimpro -macro Check_Altavista
iimpro -macro Buy_Now!
echo Done!

Click here to open a simple example batch file, and here for one that uses the "-var" options.

Macro reuse with variables: Internet Macros also support the use of variables: !VAR1, !VAR2 and !VAR3. You can assign values to these variables with the "SET" or the "PROMPT" command.

Example - Use of variables:

PROMPT Entervariable: !VAR1 http://www.iOpus.com/iim.htm
SET !VAR2 nobody@nospam.iOpus.com
TAG TYPE=A ATTR=HREF:http://submit.searchengine.com/
TAG TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:name CONTENT={{!VAR1}}
TAG TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:email CONTENT={{!VAR2}}
TAG TYPE=INPUT:SUBMIT FORM=NAME:f1 ATTR=NAME:btnG CONTENT=

Real life Example Macro: Submit2Searchengine

NEW with Version 3: With the new command line switch -var_YOURVARIABLENAME you can create and use more then three built-in variables (up to 100).

Example: "-var_FIRSTNAME  Frank" will create the variable {{FIRSTNAME}} and fill it with the value "Frank".

Tip: If you want Internet Macros to read a value from the command line use the "CMDLINE" command:

Take values from the command line:

CMDLINE !VAR1 http://www.iOpus.com/iim.htm
SET !VAR2 nobody@nospam.iOpus.com
TAG TYPE=INPUT:TEXT FORM=NAME:f1 ATTR=NAME:name CONTENT=Tom Tester!VAR1

.topic 209270
Overview of available command line switches:

-macro mymacro
Set the macro name.

-loop
Use the "LOOP" function instead of "PLAY". The number of loops is set to . Example: with "-loop 20" the macro will run 20 times.

Tip: The Windows scripting interface allows you a much finer control over loops. Use for example:

set iim1= CreateObject ("iimwsh.iim")
i = iim1.iimInit
for m = 1 to 5
  i = iim1.iimPlay("mymacro")
next
i = iim1.iimExit

-noexit

If IIM is started via the "-macro" command line, IIM closes after the macro is completed. If you want to keep IIM open, use the "-noexit" switch. A typical use of this would be if IIM handles a login for you and you want to continue to work in the browser window.

-var1 Hello[SP]World!
-var2 Hello[SP]World!
-var3 Hello[SP]World!
-datasource mydatasource.

Set the built-in variables

-var_myvar Tom[SP]Tester
Create and define a new variable with the name "myvar". You can create up to 100 user defined variables.

.topic 209180
IIM automatically installs a scripting interface (iimwsh.ocx): thus you can control Internet Macros with any programming languages that support ActiveX controls. Almost all Windows programming languages support this technology, including Visual Basic and the free Windows Scripting Host.

More examples are located in

C:/Program Files/InternetMacros3/Examples/Windows Scripting Host/

if you used the default installation path.

Windows Scripting Host Example:

(To run this example, copy this text in a file with the ending ".vbs", e.g. "test.vbs").

set iim1= CreateObject ("iimwsh.iim")
i = iim1.iimInit
i = iim1.iimSet("-var1", "Tom Tester")
i = iim1.iimSet("-tray", "")
i = iim1.iimDisplay("This is a test")
i = iim1.iimPlay("myfirstmacro")
If i > 0 Then
s = "Everything OK)
Else
s = iim1.iimGetLastMessage()
End If
MsgBox s

i = iim1.iimExit

.topic 209190
Visual Basic projects for Visual Basic 6 and VB.NET are located in

C:/Program Files/InternetMacros3/Examples/Visual Basic/

if you used the default installation path.

.topic 209200
Available scripting commands:

Note: All functions return a value > 0 if they succeed, and an error code < 0 in case of problems. You can use iimGetLastMessage to retrieve the text associated with the last error.

iimDisplay ("Hello")

This message is displayed in the Internet Macros browser. A typical usage would be to distinguish several running IIM browsers or display information on the current position within the script. If you want to hide the display so that you can manually trigger macros with the PLAY button please use iimDisplay ("#HIDEDISPLAY")

iimExit()

Close the Internet Macros browser

iimGetLastMessage()

Returns the text associated with the last error.
If the last command was iimPlay and if EXTRACT is used inside a macro iimGetLastMessage returns the extracted text. If the EXTRACT command can not find the extraction anchor, a "Extraction anchor not found (#EANF#)" message is returned. See iimPlay for more details.

iimInit()

Initialize the scripting interface.

Tip1: Use iimInit ("-tray") to start IIM in tray mode.

Tip2: If you want your script to connect to an already running instance of the IIM browser, use  iimInit ("", FALSE). A typical use for this feature is if you manually log into a website and then start the script/macro to do some work on the currently active web page.

iimPlay ("mymacro")

Play the macro! After the macro has played all options that have been set with the iimSet command are reset.

Specific return values:

1: Macro completed without problems
2: Macro completed and data extracted,
Use iimGetLastMessage to get the extracted text. Please note that if one or more EXTRACT commands fail, the return code is also "2" but the string returned by iimGetLastMessage contains the #EANF# tag.

<0: Error encountered, use iimGetLastMessage to get the error message.

Important Error Return Codes:

-1 Macro timeout. The macro is not completed within the specified time. Default value is 600s (10 min). This value can be changed with iimSetInternal ("MACROTIMEOUT", ).

-2 IIM Interface timeout: The IIM browser does not respond to the IIM browser. This error can happen when the IIM browser is very busy for a long time, for example while extracting a very large amount of data from a web page. The timeout default value is 10s. This value can be changed with iimSetInternal ("INTERFACETIMEOUT", ).

-3 User pressed STOP button: The macro was stopped by a user that clicked the STOP button

-4 Communication error. The IIM browser did not receive the last command completely.

-5 IIM browser closed: The Scripting Interface can not find the IIM browser. Typically this happens if a user closes the IIM browser.

Error codes below -100 are error codes generated during the macro replay. These are the same error codes that you get during a manual macro replay.

 iimSet ("-xx", "value")

Store values and settings that are used when Internet Macros is started. You can use exactly the same commands as for the command line interface. After iimPlay all settings are erased.

Example:
iimSet("-var1", "Tom") => Fills the variable{{!VAR1}} with Tom
iimSet("-var_ZIP", "44051") => Creates & fills the variable{{ZIP}} with "44051"
iimSet("-tray", "") => Activates the TRAY mode

.topic 9900

Direct order link
http://www.iOpus.com/store.htm

Product Home page
http://www.iOpus.com/iim.htm

Email support
support@iOpus.com

.topic 999
Compare the features of the different iOpus Internet Macros Editions.

A detailed feature comparison list can be found online at

http://www.iopus.com/iim-features.htm

If you are unsure which version is right for you, please ask us at support@iopus.com .

System requirements: Windows 98 or better, 64 MB Ram, 300 MHz PII or better, Internet Explorer 5.5 or better

.topic 209310
Activating Internet Macros removes all restrictions of the trial version. For more information on how to purchase an activation key please click here.

iOpus Internet Macros Activation:

(1) Start the Internet Macros Browser ("iimpro.exe")

(2) Click on the EDIT tab

(3) Click on the "Buy & Activate" button

(4) In the popup that appears, enter your activation key and press the "Click to activate" button

(5) Click on the PLAY tab and choose EXIT

(6) Start Internet Macros again, the version is now fully activated!

Installation Tip: You need to install Internet Macros on an account with full administrator privileges, so the Internet Explorer add-in can be installed correctly. After the installation is complete, Internet Macros can be run on any kind of user account, including the "Restricted User" account on XP.

.topic 209300
Your Internet Macros license includes FREE updates!

Once we release a new update simply download it from http://www.iopus.com/download.htm, install it and unlock it with your activation (license) key. All updates within a major release are FREE, e. g. if you purchased Version 3.0, the versions 3.1, 3.2 to 3.99 are free updates and you can use your "old" license key to unlock them.

If you want to be notified about new updates for Internet Macros and new iOpus Software, we recommend that you join our free NEWSLETTER mailing list: To subscribe visit our website at http://www.iopus.com/newsletter.htm and enter your email address.

.topic 208200
We do not recommend you to print this help file as the print capabilities of the Microsoft help viewer is rather scanty.

If you want a printed version of this help file, please download the online help in PDF format from the Internet Macros product home page

http://www.iopus.com/iim.htm

.topic 208080
If you have a problem with Internet Macros, or ask yourself "how do I do this or that...", please take a moment and look here:

      http://www.iopus.com/iim-faq.htm